airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [27/50] [abbrv] airavata git commit: Changed job submission and data movement protocol to their enums instead of String which will cause to NPE with null values
Date Tue, 11 Nov 2014 20:12:31 GMT
Changed job submission and data movement protocol to their enums instead of String which will
cause to NPE with null values


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

Branch: refs/heads/master
Commit: 3eea1a3095f735f7db3b37e65f92b653f0f28f03
Parents: ce1354e
Author: shamrath <shameerainfo@gmail.com>
Authored: Wed Nov 5 15:05:37 2014 -0500
Committer: shamrath <shameerainfo@gmail.com>
Committed: Wed Nov 5 15:05:37 2014 -0500

----------------------------------------------------------------------
 .../client/tools/RegisterSampleApplicationsUtils.java        | 7 ++++---
 .../airavata/integration/tools/DocumentCreatorUtils.java     | 8 ++++----
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3eea1a30/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
index 24c0688..184f3e9 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplicationsUtils.java
@@ -41,15 +41,16 @@ public class RegisterSampleApplicationsUtils {
     public static ComputeResourcePreference
         createComputeResourcePreference(String computeResourceId, String allocationProjectNumber,
                                         boolean overridebyAiravata, String preferredBatchQueue,
-                                        String preferredJobSubmissionProtocol,String preferredDataMovementProtocol,
+                                        JobSubmissionProtocol preferredJobSubmissionProtocol,
+                                        DataMovementProtocol preferredDataMovementProtocol,
                                         String scratchLocation) {
         ComputeResourcePreference computeResourcePreference = new ComputeResourcePreference();
         computeResourcePreference.setComputeResourceId(computeResourceId);
         computeResourcePreference.setOverridebyAiravata(overridebyAiravata);
         computeResourcePreference.setAllocationProjectNumber(allocationProjectNumber);
         computeResourcePreference.setPreferredBatchQueue(preferredBatchQueue);
-        computeResourcePreference.setPreferredDataMovementProtocol(DataMovementProtocol.valueOf(preferredDataMovementProtocol));
-        computeResourcePreference.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.valueOf(preferredJobSubmissionProtocol));
+        computeResourcePreference.setPreferredDataMovementProtocol(preferredDataMovementProtocol);
+        computeResourcePreference.setPreferredJobSubmissionProtocol(preferredJobSubmissionProtocol);
         computeResourcePreference.setScratchLocation(scratchLocation);
         return computeResourcePreference;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/3eea1a30/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
index 2fc3ac2..a49d22f 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorUtils.java
@@ -45,15 +45,15 @@ public class DocumentCreatorUtils {
 
 	public static ComputeResourcePreference createComputeResourcePreference(String computeResourceId,
String scratchLocation,
 			String allocationProjectNumber, boolean overridebyAiravata,
-			String preferredBatchQueue, String preferredJobSubmissionProtocol,
-			String preferredDataMovementProtocol) throws AppCatalogException {
+			String preferredBatchQueue, JobSubmissionProtocol preferredJobSubmissionProtocol,
+			DataMovementProtocol preferredDataMovementProtocol) throws AppCatalogException {
 		ComputeResourcePreference computeResourcePreference = new ComputeResourcePreference();
 		computeResourcePreference.setComputeResourceId(computeResourceId);
 		computeResourcePreference.setOverridebyAiravata(overridebyAiravata);
 		computeResourcePreference.setAllocationProjectNumber(allocationProjectNumber);
 		computeResourcePreference.setPreferredBatchQueue(preferredBatchQueue);
-		computeResourcePreference.setPreferredDataMovementProtocol(DataMovementProtocol.valueOf(preferredDataMovementProtocol));
-		computeResourcePreference.setPreferredJobSubmissionProtocol(JobSubmissionProtocol.valueOf(preferredJobSubmissionProtocol));
+		computeResourcePreference.setPreferredDataMovementProtocol(preferredDataMovementProtocol);
+		computeResourcePreference.setPreferredJobSubmissionProtocol(preferredJobSubmissionProtocol);
 		computeResourcePreference.setScratchLocation(scratchLocation);
 		return computeResourcePreference;
 	}


Mime
View raw message