Skip to content

Commit e5ffbfa

Browse files
committed
Fix for #283. Caused by Arduino IDE 1.6.5-r2
Due to the fact that after 1.6.5 the plugin uses the arduino boards manager for preferences the code settin are overruled when the dump file is processed.
1 parent ba3594b commit e5ffbfa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

it.baeyens.arduino.common/src/it/baeyens/arduino/common/ArduinoInstancePreferences.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,13 @@ public static String GetArduinoDefineValue() {
242242
if (fields.length != 3) {
243243
Common.log(new Status(IStatus.WARNING, ArduinoConst.CORE_PLUGIN_ID, "Malformed Arduino IDE version expected X.Y.Z got " + Ret, null));
244244
} else {
245-
Ret = String.format("%d%02d%02d", Integer.valueOf(fields[0]), Integer.valueOf(fields[1]), Integer.valueOf(fields[2]));
245+
try {
246+
Ret = String.format("%d%02d%02d", Integer.valueOf(fields[0]), Integer.valueOf(fields[1]), Integer.valueOf(fields[2]));
247+
} catch (NumberFormatException e) {
248+
Common.log(new Status(IStatus.WARNING, ArduinoConst.CORE_PLUGIN_ID, "Malformed Arduino IDE version expected X.Y.Z got " + Ret,
249+
null));
250+
Ret = getArduinoIDEVersion().trim();
251+
}
246252
}
247253
}
248254
return Ret;

0 commit comments

Comments
 (0)