aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 22:50:39 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-08 22:50:39 +1300
commitc99e32bb5da8a19c19c13e871d5c7b843b2bd182 (patch)
treee36ad02ab99876e1cdcc2db0a58b74fbb6ef27de /src/org/traccar
parent1264391afbf2407b5ea406f3b540ca34cb667543 (diff)
downloadtrackermap-server-c99e32bb5da8a19c19c13e871d5c7b843b2bd182.tar.gz
trackermap-server-c99e32bb5da8a19c19c13e871d5c7b843b2bd182.tar.bz2
trackermap-server-c99e32bb5da8a19c19c13e871d5c7b843b2bd182.zip
Check for null in query builder
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/database/QueryBuilder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index 11dbcd1b9..5846d4285 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -374,7 +374,10 @@ public class QueryBuilder {
@Override
public void process(T object, ResultSet resultSet) throws SQLException {
try {
- method.invoke(object, new Date(resultSet.getTimestamp(name).getTime()));
+ Timestamp timestamp = resultSet.getTimestamp(name);
+ if (timestamp != null) {
+ method.invoke(object, new Date(timestamp.getTime()));
+ }
} catch (IllegalAccessException | InvocationTargetException error) {
Log.warning(error);
}