@@ -64,6 +64,8 @@ public class Manager {
6464 static private List <PackageIndex > packageIndices ;
6565 static private LibraryIndex libraryIndex ;
6666
67+ private Manager () {}
68+
6769 private static void internalLoadIndices () {
6870 String [] boardUrls = ConfigurationPreferences .getBoardURLList ();
6971 packageIndices = new ArrayList <>(boardUrls .length );
@@ -100,7 +102,7 @@ public static void startup_Pluging(IProgressMonitor monitor) {
100102 if (pkg != null ) {
101103 ArduinoPlatform platform = pkg .getLatestPlatform (platformName );
102104 if (platform == null ) {
103- ArduinoPlatform platformList [] = new ArduinoPlatform [pkg .getLatestPlatforms ().size ()];
105+ ArduinoPlatform [] platformList = new ArduinoPlatform [pkg .getLatestPlatforms ().size ()];
104106 pkg .getLatestPlatforms ().toArray (platformList );
105107 platform = platformList [0 ];
106108 }
@@ -169,7 +171,6 @@ static public IStatus downloadAndInstall(ArduinoPlatform platform, boolean force
169171 }
170172 }
171173
172- // mstatus.add(make_eclipse_plugin_txt_file(platform));
173174 return mstatus .getChildren ().length == 0 ? Status .OK_STATUS : mstatus ;
174175
175176 }
@@ -327,8 +328,8 @@ public static List<ArduinoPlatform> getPlatforms() {
327328 return platforms ;
328329 }
329330
330- public static ArduinoPlatform getPlatform (String PlatformTxt ) {
331- String searchString = new File (PlatformTxt ).toString ();
331+ public static ArduinoPlatform getPlatform (String platformTxt ) {
332+ String searchString = new File (platformTxt ).toString ();
332333 for (PackageIndex index : packageIndices ) {
333334 for (Package pkg : index .getPackages ()) {
334335 for (ArduinoPlatform curPlatform : pkg .getPlatforms ()) {
@@ -627,8 +628,8 @@ public static IStatus extract(ArchiveInputStream in, File destFolder, int stripP
627628 }
628629
629630 // Set folders timestamps
630- for (File folder : foldersTimestamps .keySet ()) {
631- folder . setLastModified (foldersTimestamps . get ( folder ).longValue ());
631+ for (Map . Entry < File , Long > entry : foldersTimestamps .entrySet ()) {
632+ entry . getKey (). setLastModified (entry . getValue ( ).longValue ());
632633 }
633634
634635 return Status .OK_STATUS ;
@@ -672,7 +673,7 @@ private static void copyStreamToFile(InputStream in, long size, File outputFile)
672673
673674 // if size is not available, copy until EOF...
674675 if (size == -1 ) {
675- byte buffer [] = new byte [4096 ];
676+ byte [] buffer = new byte [4096 ];
676677 int length ;
677678 while ((length = in .read (buffer )) != -1 ) {
678679 fos .write (buffer , 0 , length );
@@ -681,7 +682,7 @@ private static void copyStreamToFile(InputStream in, long size, File outputFile)
681682 }
682683
683684 // ...else copy just the needed amount of bytes
684- byte buffer [] = new byte [4096 ];
685+ byte [] buffer = new byte [4096 ];
685686 long leftToWrite = size ;
686687 while (leftToWrite > 0 ) {
687688 int length = in .read (buffer );
0 commit comments