airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1331444 - /incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
Date Fri, 27 Apr 2012 14:45:27 GMT
Author: lahiru
Date: Fri Apr 27 14:45:27 2012
New Revision: 1331444

URL: http://svn.apache.org/viewvc?rev=1331444&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AIRAVATA-401.

Modified:
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java?rev=1331444&r1=1331443&r2=1331444&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/utils/GfacUtils.java
Fri Apr 27 14:45:27 2012
@@ -142,9 +142,11 @@ public class GfacUtils {
             actualParameter = new ActualParameter(StringParameterType.type);
             if (!"".equals(element.getText())) {
                 ((StringParameterType) actualParameter.getType()).setValue(element.getText());
-            } else {
+            } else if(element.getChildrenWithLocalName("value").hasNext()){
                 innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
                 ((StringParameterType) actualParameter.getType()).setValue(innerelement.getText());
+            } else{
+               ((StringParameterType) actualParameter.getType()).setValue("");
             }
         } else if ("Double".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(DoubleParameterType.type);
@@ -190,11 +192,13 @@ public class GfacUtils {
             actualParameter = new ActualParameter(URIParameterType.type);
             if (!"".equals(element.getText())) {
                 ((URIParameterType) actualParameter.getType()).setValue(element.getText());
-            } else {
+            } else if(element.getChildrenWithLocalName("value").hasNext()){
                 innerelement = (OMElement) element.getChildrenWithLocalName("value").next();
                 System.out.println(actualParameter.getType().toString());
                 log.debug(actualParameter.getType().toString());
                 ((URIParameterType) actualParameter.getType()).setValue(innerelement.getText());
+            } else{
+                ((URIParameterType) actualParameter.getType()).setValue("");
             }
         } else if ("StringArray".equals(parameter.getParameterType().getName())) {
             actualParameter = new ActualParameter(StringArrayType.type);



Mime
View raw message