diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-18 11:33:31 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-07-18 11:33:31 +1200 |
commit | 5c25c48c8db367097f5ee1e9bf6d7e5435e8665a (patch) | |
tree | fe789f2691e82b85b76c531db5ebac708e084b68 /src/org/traccar | |
parent | 466e704934894ed44458bec798fa9fad0532bb4c (diff) | |
download | trackermap-server-5c25c48c8db367097f5ee1e9bf6d7e5435e8665a.tar.gz trackermap-server-5c25c48c8db367097f5ee1e9bf6d7e5435e8665a.tar.bz2 trackermap-server-5c25c48c8db367097f5ee1e9bf6d7e5435e8665a.zip |
Ignore XML in other column
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/database/QueryBuilder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java index 4afa5b992..9fb92a17f 100644 --- a/src/org/traccar/database/QueryBuilder.java +++ b/src/org/traccar/database/QueryBuilder.java @@ -34,6 +34,7 @@ import java.util.List; import java.util.Map; import javax.json.Json; import javax.json.JsonReader; +import javax.json.stream.JsonParsingException; import javax.sql.DataSource; import org.traccar.model.Factory; import org.traccar.model.MiscFormatter; @@ -273,7 +274,7 @@ public class QueryBuilder { } public <T extends Factory> Collection<T> executeQuery(T prototype) throws SQLException { - List<T> result = new LinkedList<T>(); + List<T> result = new LinkedList<>(); if (query != null) { @@ -372,7 +373,7 @@ public class QueryBuilder { public void process(T object, ResultSet resultSet) throws SQLException { try (JsonReader reader = Json.createReader(new StringReader(resultSet.getString(name)))) { method.invoke(object, MiscFormatter.fromJson(reader.readObject())); - } catch (IllegalAccessException | InvocationTargetException error) { + } catch (IllegalAccessException | InvocationTargetException | JsonParsingException error) { } } }); |