X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Furls%2FIdentifiersUrlProvider.java;fp=src%2Fjalview%2Furls%2FIdentifiersUrlProvider.java;h=850a2308c6d8692fe8d441f85e57528e604984f0;hb=9c98d4bd666346f6ad3892c5394b7da3be82d93e;hp=07eb23efc9211dd3054b79a1818dc317a6fcaa9a;hpb=c7b2143c9cf7c5e05ad63251f7d3910751b16d20;p=jalview.git diff --git a/src/jalview/urls/IdentifiersUrlProvider.java b/src/jalview/urls/IdentifiersUrlProvider.java index 07eb23e..850a230 100644 --- a/src/jalview/urls/IdentifiersUrlProvider.java +++ b/src/jalview/urls/IdentifiersUrlProvider.java @@ -75,7 +75,7 @@ public class IdentifiersUrlProvider extends UrlProviderImpl * @return hashmap of identifiers.org data, keyed by MIRIAM id */ @SuppressWarnings("unchecked") -private HashMap readIdentifiers(String idFileName) + private HashMap readIdentifiers(String idFileName) { // identifiers.org data HashMap idData = new HashMap<>(); @@ -83,11 +83,12 @@ private HashMap readIdentifiers(String idFileName) String errorMessage = null; try { - // NOTE: THIS WILL FAIL IN SWINGJS BECAUSE IT INVOLVES A FILE READER - + // NOTE: THIS WILL FAIL IN SWINGJS BECAUSE IT INVOLVES A FILE READER + FileReader reader = new FileReader(idFileName); String key = ""; - Map obj = (Map) JSONUtils.parse(reader); + Map obj = (Map) JSONUtils + .parse(reader); if (obj.containsKey(ID_ORG_KEY)) { key = ID_ORG_KEY; @@ -119,9 +120,11 @@ private HashMap readIdentifiers(String idFileName) } catch (IOException | ParseException e) { // unnecessary e.printStackTrace(); - // Note how in JavaScript we can grab the first bytes from any file reader. + // 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 + // "https://." is coming from System.getProperty("user.home"), but this + // could // be set by the page developer to anything, of course. errorMessage = e.toString(); idData.clear(); @@ -129,7 +132,8 @@ private HashMap readIdentifiers(String idFileName) // BH 2018 -- added more valuable report if (errorMessage != null) { - System.err.println("IdentifiersUrlProvider: cannot read " + idFileName + ": " + errorMessage); + System.err.println("IdentifiersUrlProvider: cannot read " + idFileName + + ": " + errorMessage); } return idData; }