This is an automated email from the ASF dual-hosted git repository. sarath pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 48b106c ATLAS-4431: Add additional null check when retrieving tasks from vertex 48b106c is described below commit 48b106c422ca3d7b655c5c9bd4b97e55a6e73598 Author: Disha Talreja <dishatalr...@cloudera.com> AuthorDate: Mon Sep 20 16:25:21 2021 -0400 ATLAS-4431: Add additional null check when retrieving tasks from vertex Signed-off-by: Sarath Subramanian <sar...@apache.org> (cherry picked from commit e57204bd55d27f258c19e7334c10cc4802cf14c7) --- .../src/main/java/org/apache/atlas/tasks/TaskRegistry.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java b/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java index fae8a4f..32e0ad9 100644 --- a/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java +++ b/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java @@ -185,8 +185,16 @@ public class TaskRegistry { ret.setType(v.getProperty(Constants.TASK_TYPE, String.class)); ret.setStatus(v.getProperty(Constants.TASK_STATUS, String.class)); ret.setCreatedBy(v.getProperty(Constants.TASK_CREATED_BY, String.class)); - ret.setCreatedTime(new Date(v.getProperty(Constants.TASK_CREATED_TIME, Long.class))); - ret.setUpdatedTime(new Date(v.getProperty(Constants.TASK_UPDATED_TIME, Long.class))); + + Long createdTime = v.getProperty(Constants.TASK_CREATED_TIME, Long.class); + if (createdTime != null) { + ret.setCreatedTime(new Date(createdTime)); + } + + Long updatedTime = v.getProperty(Constants.TASK_UPDATED_TIME, Long.class); + if (updatedTime != null) { + ret.setUpdatedTime(new Date(updatedTime)); + } Long startTime = v.getProperty(Constants.TASK_START_TIME, Long.class); if (startTime != null) {