File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/main/java/com/falsepattern/lib/internal/impl/dependencies Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,12 @@ public static void scanDeps() {
284
284
.map ((source ) -> {
285
285
//Convert source to GSON json
286
286
try (val is = source .openStream ()) {
287
- val json = new JsonParser ().parse (new InputStreamReader (is )).getAsJsonObject ();
288
- if (!(json .isJsonObject () &&
289
- json .has ("identifier" ) &&
287
+ val jsonRaw = new JsonParser ().parse (new InputStreamReader (is ));
288
+ if (!jsonRaw .isJsonObject ()) {
289
+ return null ;
290
+ }
291
+ val json = jsonRaw .getAsJsonObject ();
292
+ if (!(json .has ("identifier" ) &&
290
293
json .get ("identifier" )
291
294
.getAsString ()
292
295
.equals ("falsepatternlib_dependencies" )
@@ -300,7 +303,7 @@ public static void scanDeps() {
300
303
val root = gson .fromJson (json , DepRoot .class );
301
304
root .source (source .toString ());
302
305
return root ;
303
- } catch (IOException e ) {
306
+ } catch (Exception e ) {
304
307
LOG .error ("Failed to read json from source {}: {}" , source , e );
305
308
return null ;
306
309
}
You can’t perform that action at this time.
0 commit comments