aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-12-27 18:13:42 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-12-27 18:13:42 -0800
commitd7c0913ba636bb32d9451b7b40d907d8a84bab93 (patch)
treec7fa9a9fc4022e3a7e150e6799b988e53b750ba5 /src/main/java/org/traccar/database
parentf40ef905b1db1aadabbd4496331755fb984d88c5 (diff)
downloadtrackermap-server-d7c0913ba636bb32d9451b7b40d907d8a84bab93.tar.gz
trackermap-server-d7c0913ba636bb32d9451b7b40d907d8a84bab93.tar.bz2
trackermap-server-d7c0913ba636bb32d9451b7b40d907d8a84bab93.zip
Remove XML attributes support
Diffstat (limited to 'src/main/java/org/traccar/database')
-rw-r--r--src/main/java/org/traccar/database/QueryBuilder.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/database/QueryBuilder.java b/src/main/java/org/traccar/database/QueryBuilder.java
index 084d2940b..396cbf562 100644
--- a/src/main/java/org/traccar/database/QueryBuilder.java
+++ b/src/main/java/org/traccar/database/QueryBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.Context;
-import org.traccar.model.MiscFormatter;
import org.traccar.model.Permission;
import javax.sql.DataSource;
@@ -280,12 +279,7 @@ public final class QueryBuilder {
} else if (method.getReturnType().equals(byte[].class)) {
setBlob(name, (byte[]) method.invoke(object));
} else {
- if (method.getReturnType().equals(Map.class)
- && Context.getConfig().getBoolean("database.xml")) {
- setString(name, MiscFormatter.toXmlString((Map) method.invoke(object)));
- } else {
- setString(name, Context.getObjectMapper().writeValueAsString(method.invoke(object)));
- }
+ setString(name, Context.getObjectMapper().writeValueAsString(method.invoke(object)));
}
} catch (IllegalAccessException | InvocationTargetException | JsonProcessingException error) {
LOGGER.warn("Get property error", error);