@@ -85,7 +85,7 @@ public class Base {
85
85
public static volatile Base INSTANCE ;
86
86
87
87
public static SplashScreenHelper splashScreenHelper = new SplashScreenHelper (SplashScreen .getSplashScreen ());
88
- public static Map <String , Object > FIND_DIALOG_STATE = new HashMap <String , Object >();
88
+ public static Map <String , Object > FIND_DIALOG_STATE = new HashMap <>();
89
89
private final ContributionInstaller contributionInstaller ;
90
90
private final LibraryInstaller libraryInstaller ;
91
91
private ContributionsSelfCheck contributionsSelfCheck ;
@@ -266,7 +266,7 @@ static public File absoluteFile(String path) {
266
266
267
267
public Base (String [] args ) throws Exception {
268
268
BaseNoGui .notifier = new GUIUserNotifier (this );
269
- this .recentSketchesMenuItems = new LinkedList <JMenuItem >();
269
+ this .recentSketchesMenuItems = new LinkedList <>();
270
270
271
271
CommandlineParser parser = new CommandlineParser (args );
272
272
parser .parseArgumentsPhase1 ();
@@ -584,15 +584,15 @@ protected void storeRecentSketches(SketchController sketch) {
584
584
return ;
585
585
}
586
586
587
- Set <String > sketches = new LinkedHashSet <String >();
587
+ Set <String > sketches = new LinkedHashSet <>();
588
588
sketches .add (sketch .getSketch ().getMainFilePath ());
589
589
sketches .addAll (PreferencesData .getCollection ("recent.sketches" ));
590
590
591
591
PreferencesData .setCollection ("recent.sketches" , sketches );
592
592
}
593
593
594
594
protected void removeRecentSketchPath (String path ) {
595
- Collection <String > sketches = new LinkedList <String >(PreferencesData .getCollection ("recent.sketches" ));
595
+ Collection <String > sketches = new LinkedList <>(PreferencesData .getCollection ("recent.sketches" ));
596
596
sketches .remove (path );
597
597
PreferencesData .setCollection ("recent.sketches" , sketches );
598
598
}
@@ -1049,7 +1049,7 @@ protected void rebuildSketchbookMenu(JMenu menu) {
1049
1049
}
1050
1050
1051
1051
private List <ContributedLibrary > getSortedLibraries () {
1052
- List <ContributedLibrary > installedLibraries = new LinkedList <ContributedLibrary >(BaseNoGui .librariesIndexer .getInstalledLibraries ());
1052
+ List <ContributedLibrary > installedLibraries = new LinkedList <>(BaseNoGui .librariesIndexer .getInstalledLibraries ());
1053
1053
Collections .sort (installedLibraries , new LibraryByTypeComparator ());
1054
1054
Collections .sort (installedLibraries , new LibraryOfSameTypeComparator ());
1055
1055
return installedLibraries ;
@@ -1415,7 +1415,7 @@ public void actionPerformed(ActionEvent actionevent) {
1415
1415
boardMenu .add (new JSeparator ());
1416
1416
1417
1417
// Generate custom menus for all platforms
1418
- Set <String > customMenusTitles = new HashSet <String >();
1418
+ Set <String > customMenusTitles = new HashSet <>();
1419
1419
for (TargetPackage targetPackage : BaseNoGui .packages .values ()) {
1420
1420
for (TargetPlatform targetPlatform : targetPackage .platforms ()) {
1421
1421
customMenusTitles .addAll (targetPlatform .getCustomMenus ().values ());
@@ -1427,10 +1427,10 @@ public void actionPerformed(ActionEvent actionevent) {
1427
1427
boardsCustomMenus .add (customMenu );
1428
1428
}
1429
1429
1430
- List <JMenuItem > menuItemsToClickAfterStartup = new LinkedList <JMenuItem >();
1430
+ List <JMenuItem > menuItemsToClickAfterStartup = new LinkedList <>();
1431
1431
1432
1432
ButtonGroup boardsButtonGroup = new ButtonGroup ();
1433
- Map <String , ButtonGroup > buttonGroupsMap = new HashMap <String , ButtonGroup >();
1433
+ Map <String , ButtonGroup > buttonGroupsMap = new HashMap <>();
1434
1434
1435
1435
// Cycle through all packages
1436
1436
boolean first = true ;
@@ -2129,7 +2129,7 @@ static public byte[] loadBytesRaw(File file) throws IOException {
2129
2129
* that are separated by = and ignore comments with #.
2130
2130
*/
2131
2131
static public HashMap <String , String > readSettings (File inputFile ) {
2132
- HashMap <String , String > outgoing = new HashMap <String , String >();
2132
+ HashMap <String , String > outgoing = new HashMap <>();
2133
2133
if (!inputFile .exists ()) return outgoing ; // return empty hash
2134
2134
2135
2135
String lines [] = PApplet .loadStrings (inputFile );
0 commit comments