diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-08-16 00:19:43 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-08-16 00:19:43 +1200 |
commit | 7c56e30b389f06713272532c10bac68ec108a29c (patch) | |
tree | 7efdd073c039e50ce8277b6418e35347eefc4359 /src/org/traccar | |
parent | a21ddfbff975ef9ff3e7e8857697407457010a8b (diff) | |
download | traccar-server-7c56e30b389f06713272532c10bac68ec108a29c.tar.gz traccar-server-7c56e30b389f06713272532c10bac68ec108a29c.tar.bz2 traccar-server-7c56e30b389f06713272532c10bac68ec108a29c.zip |
Improve xml formatter
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/model/ExtendedInfoFormatter.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/model/ExtendedInfoFormatter.java b/src/org/traccar/model/ExtendedInfoFormatter.java index 756845b9d..99966569e 100644 --- a/src/org/traccar/model/ExtendedInfoFormatter.java +++ b/src/org/traccar/model/ExtendedInfoFormatter.java @@ -32,6 +32,11 @@ public class ExtendedInfoFormatter { public void set(String key, Object value) { if (value != null) { + // Exclude empty strings + if ((value instanceof String) && ((String) value).isEmpty()) { + return; + } + data.append("<").append(key).append(">"); data.append(value); data.append("</").append(key).append(">"); |