aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);
}