aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/MiscFormatter.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 13:20:46 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 13:20:46 +1300
commitd4dbf85d9536bfec85252a58fc552e2bad42ff17 (patch)
tree4a849426c2cd60538b152138b147abef47b40966 /src/org/traccar/model/MiscFormatter.java
parent9218bc65b9673b24d2866aae3d5bbe1a5388bab0 (diff)
downloadtrackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.gz
trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.bz2
trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.zip
Remove trailing whitespaces from code
Diffstat (limited to 'src/org/traccar/model/MiscFormatter.java')
-rw-r--r--src/org/traccar/model/MiscFormatter.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/model/MiscFormatter.java b/src/org/traccar/model/MiscFormatter.java
index 38aa853d4..725270122 100644
--- a/src/org/traccar/model/MiscFormatter.java
+++ b/src/org/traccar/model/MiscFormatter.java
@@ -46,18 +46,18 @@ public class MiscFormatter {
public static String toXmlString(Map<String, Object> attributes) {
StringBuilder result = new StringBuilder();
-
+
result.append("<").append(xmlRootNode).append(">");
-
+
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
-
+
result.append("<").append(entry.getKey()).append(">");
result.append(format(entry.getValue()));
result.append("</").append(entry.getKey()).append(">");
}
result.append("</").append(xmlRootNode).append(">");
-
+
return result.toString();
}
@@ -84,11 +84,11 @@ public class MiscFormatter {
return json.build();
}
-
+
public static Map<String, Object> fromJson(JsonObject json) {
-
+
Map<String, Object> attributes = new LinkedHashMap<>();
-
+
for (Map.Entry<String, JsonValue> entry : json.entrySet()) {
switch (entry.getValue().getValueType()) {
case STRING:
@@ -110,10 +110,10 @@ public class MiscFormatter {
break;
}
}
-
+
return attributes;
}
-
+
public static String toJsonString(Map<String, Object> attributes) {
return toJson(attributes).toString();
}