File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
arduino-core/src/cc/arduino/contributions/libraries Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,16 @@ private void parseIndex(File file) throws IOException {
89
89
mapper .configure (DeserializationFeature .ACCEPT_SINGLE_VALUE_AS_ARRAY , true );
90
90
mapper .configure (DeserializationFeature .EAGER_DESERIALIZER_FETCH , true );
91
91
mapper .configure (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false );
92
- index = mapper .readValue (indexIn , LibrariesIndex .class );
92
+ LibrariesIndex newIndex = mapper .readValue (indexIn , LibrariesIndex .class );
93
93
94
- index .getLibraries ()
94
+ newIndex .getLibraries ()
95
95
.stream ()
96
96
.filter (library -> library .getCategory () == null || "" .equals (library .getCategory ()) || !Constants .LIBRARY_CATEGORIES .contains (library .getCategory ()))
97
97
.forEach (library -> library .setCategory ("Uncategorized" ));
98
+
99
+ index = newIndex ;
100
+ } catch (Exception e ) {
101
+ System .err .println ("Error parsing library.index:" + e .getMessage ());
98
102
} finally {
99
103
IOUtils .closeQuietly (indexIn );
100
104
}
You can’t perform that action at this time.
0 commit comments