airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: Fixed GfacExperimentState conflict issue.
Date Tue, 12 May 2015 18:42:42 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 258e06e1c -> 09db4ec38


Fixed GfacExperimentState conflict issue.


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/09db4ec3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/09db4ec3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/09db4ec3

Branch: refs/heads/master
Commit: 09db4ec38eb1707b851787e0a1144f8250e6c0c5
Parents: 258e06e
Author: shamrath <shameerainfo@gmail.com>
Authored: Tue May 12 14:42:35 2015 -0400
Committer: shamrath <shameerainfo@gmail.com>
Committed: Tue May 12 14:42:35 2015 -0400

----------------------------------------------------------------------
 .../gfac/core/states/GfacExperimentState.java   | 29 --------------------
 .../airavata/gfac/core/utils/GFacUtils.java     |  4 +--
 2 files changed, 2 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/09db4ec3/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/states/GfacExperimentState.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/states/GfacExperimentState.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/states/GfacExperimentState.java
index 7bf7d3b..763a876 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/states/GfacExperimentState.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/states/GfacExperimentState.java
@@ -49,33 +49,4 @@ public enum GfacExperimentState {
         return value;
     }
 
-    /**
-     * Find a the enum type by its integer value, as defined in the Thrift IDL.
-     *
-     * @return null if the value is not found.
-     */
-    public static GfacExperimentState findByValue(int value) {
-        switch (value) {
-            case 0:
-                return INHANDLERSINVOKING;
-            case 1:
-                return INHANDLERSINVOKED;
-            case 2:
-                return PROVIDERINVOKING;
-            case 3:
-                return PROVIDERINVOKED;
-            case 4:
-                return OUTHANDLERSINVOKING;
-            case 5:
-                return OUTHANDLERSINVOKED;
-            case 6:
-                return COMPLETED;
-            case 7:
-                return FAILED;
-            case 8:
-                return UNKNOWN;
-            default:
-                return null;
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/09db4ec3/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 5bcd75c..205c1e3 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -906,8 +906,8 @@ public class GFacUtils {
         if (expState == null || expState.isEmpty()) {
             return GfacExperimentState.UNKNOWN;
         }
-        return GfacExperimentState.findByValue(Integer.valueOf(expState));
-	}
+        return GfacExperimentState.valueOf(expState);
+    }
 
 	public static int getZKExperimentStateValue(ZooKeeper zk,
 			JobExecutionContext jobExecutionContext)


Mime
View raw message