[ARVADOS] updated: fde1e4f00e82c7a776892c1ab9c5edacf05dc1c3

git at public.curoverse.com git at public.curoverse.com
Wed May 7 08:13:54 EDT 2014


Summary of changes:
 sdk/java/ArvadosSDKJavaExampleWithPrompt.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

       via  fde1e4f00e82c7a776892c1ab9c5edacf05dc1c3 (commit)
      from  97252f1f34486073c778c0a1c9de25f2f275cacd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit fde1e4f00e82c7a776892c1ab9c5edacf05dc1c3
Author: radhika <radhika at curoverse.com>
Date:   Wed May 7 08:03:40 2014 -0400

    2525: example

diff --git a/sdk/java/ArvadosSDKJavaExampleWithPrompt.java b/sdk/java/ArvadosSDKJavaExampleWithPrompt.java
index b87c00f..725c588 100644
--- a/sdk/java/ArvadosSDKJavaExampleWithPrompt.java
+++ b/sdk/java/ArvadosSDKJavaExampleWithPrompt.java
@@ -52,8 +52,7 @@ public class ArvadosSDKJavaExampleWithPrompt {
       String methodName = in.readLine().trim();
 
       // read method parameters
-      System.out
-          .println("\nEnter parameter name, value (for example uuid, uuid-value): ");
+      System.out.println("\nEnter parameter name, value (for example uuid, uuid-value): ");
       Map paramsMap = new HashMap();
       String param = "";
       try {
@@ -61,9 +60,11 @@ public class ArvadosSDKJavaExampleWithPrompt {
           param = in.readLine();
           if (param.isEmpty())
             break;
-
-          String[] params = param.split(",");
-          paramsMap.put(params[0].trim(), params[1].trim());
+          int index = param.indexOf(","); // first comma
+          String paramName = param.substring(0, index);
+          String paramValue = param.substring(index);
+          System.out.println(paramName + " " + paramValue);
+          paramsMap.put(paramName.trim(), paramValue.trim());
 
           System.out.println("\nEnter parameter name, value (for example uuid, uuid-value): ");
         } while (!param.isEmpty());

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list