Skip to content

Commit b12adf2

Browse files
committed
Whitespace correction
1 parent 10b0893 commit b12adf2

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

notesolver/src/main/java/org/openstreetmap/josm/plugins/notesolver/NoteSolverPlugin.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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");

notesolver/src/main/java/org/openstreetmap/josm/plugins/notesolver/NoteText.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import org.openstreetmap.josm.data.notes.*;
44

55
public class NoteText {
6-
private static int maxMenuItemLen = 50;
7-
public static String noteShortText(Note n) {
6+
private static int maxMenuItemLen = 50;
7+
public static String noteShortText(Note n) {
88
String firstComment = n.getFirstComment().toString();
99
if (firstComment.length() > maxMenuItemLen) firstComment = firstComment.substring(0, maxMenuItemLen) + "...";
1010
String menuItemText =

0 commit comments

Comments
 (0)