From 1811e75fb1f859df25045e06c963f3e19f442d34 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 10 Feb 2017 16:27:13 +0000 Subject: [PATCH] refs #772 Support Scheduled Task take in charge from Orphaned RIs git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@142463 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../persistence/orientdb/OrientDBPersistenceConnector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/vremanagement/executor/persistence/orientdb/OrientDBPersistenceConnector.java b/src/main/java/org/gcube/vremanagement/executor/persistence/orientdb/OrientDBPersistenceConnector.java index 6361d9e..320c682 100644 --- a/src/main/java/org/gcube/vremanagement/executor/persistence/orientdb/OrientDBPersistenceConnector.java +++ b/src/main/java/org/gcube/vremanagement/executor/persistence/orientdb/OrientDBPersistenceConnector.java @@ -401,8 +401,8 @@ public class OrientDBPersistenceConnector extends ODocument doc = getScheduledTaskDocument(db, uuid); - long timestamp = doc.field(TIMESTAMP); - if (timestamp != scheduledTask.getTimestamp()) { + Long timestamp = doc.field(TIMESTAMP); + if (timestamp!=null && timestamp != scheduledTask.getTimestamp()) { throw new SchedulePersistenceException( "The ScheduledTask has been changed."); }