aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/QueryBuilder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index 127229700..5a4948de0 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -308,7 +308,8 @@ public final class QueryBuilder {
}
private <T> void addProcessors(
- List<ResultSetProcessor<T>> processors, Class<?> parameterType, final Method method, final String name) {
+ List<ResultSetProcessor<T>> processors,
+ final Class<?> parameterType, final Method method, final String name) {
if (parameterType.equals(boolean.class)) {
processors.add(new ResultSetProcessor<T>() {
@@ -397,7 +398,7 @@ public final class QueryBuilder {
String value = resultSet.getString(name);
if (value != null) {
try {
- method.invoke(object, Context.getObjectMapper().readValue(value, Map.class));
+ method.invoke(object, Context.getObjectMapper().readValue(value, parameterType));
} catch (InvocationTargetException | IllegalAccessException | IOException error) {
Log.warning(error);
}