@@ -64,6 +64,8 @@ public class Manager {
64
64
static private List <PackageIndex > packageIndices ;
65
65
static private LibraryIndex libraryIndex ;
66
66
67
+ private Manager () {}
68
+
67
69
private static void internalLoadIndices () {
68
70
String [] boardUrls = ConfigurationPreferences .getBoardURLList ();
69
71
packageIndices = new ArrayList <>(boardUrls .length );
@@ -100,7 +102,7 @@ public static void startup_Pluging(IProgressMonitor monitor) {
100
102
if (pkg != null ) {
101
103
ArduinoPlatform platform = pkg .getLatestPlatform (platformName );
102
104
if (platform == null ) {
103
- ArduinoPlatform platformList [] = new ArduinoPlatform [pkg .getLatestPlatforms ().size ()];
105
+ ArduinoPlatform [] platformList = new ArduinoPlatform [pkg .getLatestPlatforms ().size ()];
104
106
pkg .getLatestPlatforms ().toArray (platformList );
105
107
platform = platformList [0 ];
106
108
}
@@ -169,7 +171,6 @@ static public IStatus downloadAndInstall(ArduinoPlatform platform, boolean force
169
171
}
170
172
}
171
173
172
- // mstatus.add(make_eclipse_plugin_txt_file(platform));
173
174
return mstatus .getChildren ().length == 0 ? Status .OK_STATUS : mstatus ;
174
175
175
176
}
@@ -327,8 +328,8 @@ public static List<ArduinoPlatform> getPlatforms() {
327
328
return platforms ;
328
329
}
329
330
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 ();
332
333
for (PackageIndex index : packageIndices ) {
333
334
for (Package pkg : index .getPackages ()) {
334
335
for (ArduinoPlatform curPlatform : pkg .getPlatforms ()) {
@@ -627,8 +628,8 @@ public static IStatus extract(ArchiveInputStream in, File destFolder, int stripP
627
628
}
628
629
629
630
// 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 ());
632
633
}
633
634
634
635
return Status .OK_STATUS ;
@@ -672,7 +673,7 @@ private static void copyStreamToFile(InputStream in, long size, File outputFile)
672
673
673
674
// if size is not available, copy until EOF...
674
675
if (size == -1 ) {
675
- byte buffer [] = new byte [4096 ];
676
+ byte [] buffer = new byte [4096 ];
676
677
int length ;
677
678
while ((length = in .read (buffer )) != -1 ) {
678
679
fos .write (buffer , 0 , length );
@@ -681,7 +682,7 @@ private static void copyStreamToFile(InputStream in, long size, File outputFile)
681
682
}
682
683
683
684
// ...else copy just the needed amount of bytes
684
- byte buffer [] = new byte [4096 ];
685
+ byte [] buffer = new byte [4096 ];
685
686
long leftToWrite = size ;
686
687
while (leftToWrite > 0 ) {
687
688
int length = in .read (buffer );
0 commit comments