diff options
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r-- | src/org/traccar/model/MiscFormatter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/model/MiscFormatter.java b/src/org/traccar/model/MiscFormatter.java index f62e1f42c..2bc6207fb 100644 --- a/src/org/traccar/model/MiscFormatter.java +++ b/src/org/traccar/model/MiscFormatter.java @@ -91,7 +91,8 @@ public class MiscFormatter { Map<String, Object> attributes = new LinkedHashMap<>(); for (Map.Entry<String, JsonValue> entry : json.entrySet()) { - switch (entry.getValue().getValueType()) { + JsonValue.ValueType type = entry.getValue().getValueType(); + switch (type) { case STRING: attributes.put(entry.getKey(), ((JsonString) entry.getValue()).getString()); break; @@ -110,7 +111,7 @@ public class MiscFormatter { attributes.put(entry.getKey(), false); break; default: - Log.warning(new IllegalArgumentException()); + Log.warning(new IllegalArgumentException(type.name())); break; } } |