@@ -382,30 +382,30 @@ private String getUrl(Object inputObject, Enum<linkTypes> linkType) {
382382 return returnValue ;
383383 }
384384
385- private String getOnlineNoteStatus (long noteId ) {
385+ private String getOnlineNoteStatus (long noteId ) {
386386 DocumentBuilderFactory dbf = DocumentBuilderFactory .newInstance ();
387387 String result = "" ;
388388 String apiUrl = getServerUrl () + "api/0.6/notes/" + Long .toString (noteId );
389389
390- try {
391- URLConnection conn = new URL (apiUrl ).openConnection ();
392- try (InputStream is = conn .getInputStream ()) {
393- dbf .setFeature (XMLConstants .FEATURE_SECURE_PROCESSING , true );
394- DocumentBuilder dBuilder = dbf .newDocumentBuilder ();
395- Document doc = dBuilder .parse (is );
396- Element element = doc .getDocumentElement ();
390+ try {
391+ URLConnection conn = new URL (apiUrl ).openConnection ();
392+ try (InputStream is = conn .getInputStream ()) {
393+ dbf .setFeature (XMLConstants .FEATURE_SECURE_PROCESSING , true );
394+ DocumentBuilder dBuilder = dbf .newDocumentBuilder ();
395+ Document doc = dBuilder .parse (is );
396+ Element element = doc .getDocumentElement ();
397397
398- NodeList nodeList = element .getElementsByTagName ("status" );
399- if (nodeList .getLength () > 0 ) {
398+ NodeList nodeList = element .getElementsByTagName ("status" );
399+ if (nodeList .getLength () > 0 ) {
400400 result = nodeList .item (0 ).getTextContent ();
401- }
402- }
403- } catch (Exception e ) {
404- result = "failure" ;
405- }
406-
407- return result ;
408- }
401+ }
402+ }
403+ } catch (Exception e ) {
404+ result = "failure" ;
405+ }
406+
407+ return result ;
408+ }
409409
410410 private static String getServerUrl () {
411411 final String customServerUrl = Config .getPref ().get ("osm-server.url" );
0 commit comments