From: hansonr Date: Wed, 28 Aug 2019 04:49:16 +0000 (-0500) Subject: note that identifier can be null, resulting in a null pointer exception X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=53e08349530455948759a41be51c59768c15a2c1 note that identifier can be null, resulting in a null pointer exception --- diff --git a/src/jalview/urls/IdentifiersUrlProvider.java b/src/jalview/urls/IdentifiersUrlProvider.java index 07eb23e..a44b9b9 100644 --- a/src/jalview/urls/IdentifiersUrlProvider.java +++ b/src/jalview/urls/IdentifiersUrlProvider.java @@ -85,6 +85,7 @@ private HashMap readIdentifiers(String idFileName) { // NOTE: THIS WILL FAIL IN SWINGJS BECAUSE IT INVOLVES A FILE READER + System.out.println("IDentifiersURL " + idFileName); FileReader reader = new FileReader(idFileName); String key = ""; Map obj = (Map) JSONUtils.parse(reader); @@ -118,7 +119,8 @@ private HashMap readIdentifiers(String idFileName) } } catch (IOException | ParseException e) { - // unnecessary e.printStackTrace(); + // unnecessary + e.printStackTrace(); // Note how in JavaScript we can grab the first bytes from any file reader. // Typical report here is "NetworkError" because the file does not exist. // "https://." is coming from System.getProperty("user.home"), but this could