@@ -85,7 +85,7 @@ public class Base {
8585 public static volatile Base INSTANCE ;
8686
8787 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 <>();
8989 private final ContributionInstaller contributionInstaller ;
9090 private final LibraryInstaller libraryInstaller ;
9191 private ContributionsSelfCheck contributionsSelfCheck ;
@@ -266,7 +266,7 @@ static public File absoluteFile(String path) {
266266
267267 public Base (String [] args ) throws Exception {
268268 BaseNoGui .notifier = new GUIUserNotifier (this );
269- this .recentSketchesMenuItems = new LinkedList <JMenuItem >();
269+ this .recentSketchesMenuItems = new LinkedList <>();
270270
271271 CommandlineParser parser = new CommandlineParser (args );
272272 parser .parseArgumentsPhase1 ();
@@ -584,15 +584,15 @@ protected void storeRecentSketches(SketchController sketch) {
584584 return ;
585585 }
586586
587- Set <String > sketches = new LinkedHashSet <String >();
587+ Set <String > sketches = new LinkedHashSet <>();
588588 sketches .add (sketch .getSketch ().getMainFilePath ());
589589 sketches .addAll (PreferencesData .getCollection ("recent.sketches" ));
590590
591591 PreferencesData .setCollection ("recent.sketches" , sketches );
592592 }
593593
594594 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" ));
596596 sketches .remove (path );
597597 PreferencesData .setCollection ("recent.sketches" , sketches );
598598 }
@@ -1049,7 +1049,7 @@ protected void rebuildSketchbookMenu(JMenu menu) {
10491049 }
10501050
10511051 private List <ContributedLibrary > getSortedLibraries () {
1052- List <ContributedLibrary > installedLibraries = new LinkedList <ContributedLibrary >(BaseNoGui .librariesIndexer .getInstalledLibraries ());
1052+ List <ContributedLibrary > installedLibraries = new LinkedList <>(BaseNoGui .librariesIndexer .getInstalledLibraries ());
10531053 Collections .sort (installedLibraries , new LibraryByTypeComparator ());
10541054 Collections .sort (installedLibraries , new LibraryOfSameTypeComparator ());
10551055 return installedLibraries ;
@@ -1415,7 +1415,7 @@ public void actionPerformed(ActionEvent actionevent) {
14151415 boardMenu .add (new JSeparator ());
14161416
14171417 // Generate custom menus for all platforms
1418- Set <String > customMenusTitles = new HashSet <String >();
1418+ Set <String > customMenusTitles = new HashSet <>();
14191419 for (TargetPackage targetPackage : BaseNoGui .packages .values ()) {
14201420 for (TargetPlatform targetPlatform : targetPackage .platforms ()) {
14211421 customMenusTitles .addAll (targetPlatform .getCustomMenus ().values ());
@@ -1427,10 +1427,10 @@ public void actionPerformed(ActionEvent actionevent) {
14271427 boardsCustomMenus .add (customMenu );
14281428 }
14291429
1430- List <JMenuItem > menuItemsToClickAfterStartup = new LinkedList <JMenuItem >();
1430+ List <JMenuItem > menuItemsToClickAfterStartup = new LinkedList <>();
14311431
14321432 ButtonGroup boardsButtonGroup = new ButtonGroup ();
1433- Map <String , ButtonGroup > buttonGroupsMap = new HashMap <String , ButtonGroup >();
1433+ Map <String , ButtonGroup > buttonGroupsMap = new HashMap <>();
14341434
14351435 // Cycle through all packages
14361436 boolean first = true ;
@@ -2129,7 +2129,7 @@ static public byte[] loadBytesRaw(File file) throws IOException {
21292129 * that are separated by = and ignore comments with #.
21302130 */
21312131 static public HashMap <String , String > readSettings (File inputFile ) {
2132- HashMap <String , String > outgoing = new HashMap <String , String >();
2132+ HashMap <String , String > outgoing = new HashMap <>();
21332133 if (!inputFile .exists ()) return outgoing ; // return empty hash
21342134
21352135 String lines [] = PApplet .loadStrings (inputFile );
0 commit comments