airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1235457 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
Date Tue, 24 Jan 2012 20:06:03 GMT
Author: lahiru
Date: Tue Jan 24 20:06:03 2012
New Revision: 1235457

URL: http://svn.apache.org/viewvc?rev=1235457&view=rev
Log:
fixing minor issue with XBayaClient.

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java?rev=1235457&r1=1235456&r2=1235457&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/clients/XBayaClient.java
Tue Jan 24 20:06:03 2012
@@ -125,11 +125,11 @@ public class XBayaClient {
         
         configurations[8] = new NameValue();
         configurations[8].setName(JCR_USERNAME);
-        configurations[9].setValue(properties.getProperty(JCR_USERNAME));
+        configurations[8].setValue(properties.getProperty(JCR_USERNAME));
         
-        configurations[10] = new NameValue();
-        configurations[10].setName(JCR_PASSWORD);
-        configurations[10].setValue(properties.getProperty(JCR_PASSWORD));
+        configurations[9] = new NameValue();
+        configurations[9].setName(JCR_PASSWORD);
+        configurations[9].setValue(properties.getProperty(JCR_PASSWORD));
         
         updateClientConfiguration(configurations);
 
@@ -174,7 +174,13 @@ public class XBayaClient {
     public void loadWorkflowFromaFile(String workflowFile)throws URISyntaxException,IOException
{
 
         URL url = XBayaClient.class.getClassLoader().getResource(workflowFile);
-        FileInputStream stream = new FileInputStream(new File(url.toURI()));
+        File workflow;
+        if(url == null){
+            workflow = new File(workflowFile);
+        }else{
+            workflow = new File(url.toURI());
+        }
+        FileInputStream stream = new FileInputStream(workflow);
         try {
             FileChannel fc = stream.getChannel();
             MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());



Mime
View raw message