This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch 
airavata-2938-change-db-initialization-in-registry-server-to-use-registry-refactoring-code
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to 
refs/heads/airavata-2938-change-db-initialization-in-registry-server-to-use-registry-refactoring-code
 by this push:
     new 8eaa65e  AIRAVATA-2938 -1 is out of range for TIMESTAMP
8eaa65e is described below

commit 8eaa65ef531fe42479627207287be19e40e832aa
Author: Marcus Christie <[email protected]>
AuthorDate: Mon Feb 4 12:33:13 2019 -0500

    AIRAVATA-2938 -1 is out of range for TIMESTAMP
---
 .../airavata/service/profile/handlers/UserProfileServiceHandler.java  | 2 +-
 .../src/main/java/org/apache/airavata/MigrationManager.java           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
 
b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
index 3a6f137..f6562b5 100644
--- 
a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
+++ 
b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
@@ -88,7 +88,7 @@ public class UserProfileServiceHandler implements 
UserProfileService.Iface {
             userProfile.setLastName(userInfo.getLastName());
             
userProfile.setCreationTime(AiravataUtils.getCurrentTimestamp().getTime());
             
userProfile.setLastAccessTime(AiravataUtils.getCurrentTimestamp().getTime());
-            userProfile.setValidUntil(-1);
+            userProfile.setValidUntil(0);
             userProfile.setState(Status.ACTIVE);
             userProfile = userProfileRepository.createUserProfile(userProfile);
             if (null != userProfile) {
diff --git 
a/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java
 
b/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java
index 422a290..e2646c9 100644
--- 
a/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java
+++ 
b/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java
@@ -309,7 +309,7 @@ public class MigrationManager {
             airavataUserProfile.setCountry(ISProfile.getCountry());
             airavataUserProfile.setCreationTime(new Date().getTime());
             airavataUserProfile.setLastAccessTime(new Date().getTime());
-            airavataUserProfile.setValidUntil(-1);
+            airavataUserProfile.setValidUntil(0);
             airavataUserProfile.setState(Status.ACTIVE);
             //TODO: fix authtzToken, for now we are using empty token, but 
need to properly populate claims map
             AuthzToken authzToken = new AuthzToken("dummy_token");
@@ -388,4 +388,4 @@ public class MigrationManager {
             throw new RuntimeException(e);
         }
     }
-}
\ No newline at end of file
+}

Reply via email to