[Swift-commit] cog r3465

swift at ci.uchicago.edu swift at ci.uchicago.edu
Tue Sep 11 04:25:04 CDT 2012


------------------------------------------------------------------------
r3465 | hategan | 2012-09-11 04:24:56 -0500 (Tue, 11 Sep 2012) | 1 line

send status code as int instead of string
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/JobStatusHandler.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/JobStatusHandler.java	(revision 3464)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/local/JobStatusHandler.java	(working copy)
@@ -27,8 +27,8 @@
     public void requestComplete() throws ProtocolException {
         try {
             String jobId = getInDataAsString(0);
-            int status = Integer.parseInt(getInDataAsString(1));
-            int code = Integer.parseInt(getInDataAsString(2));
+            int status = getInDataAsInt(1);
+            int code = getInDataAsInt(2);
             String message = getInDataAsString(3);
             
             Status s = new StatusImpl();
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/JobStatusCommand.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/JobStatusCommand.java	(revision 3464)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/JobStatusCommand.java	(working copy)
@@ -44,12 +44,12 @@
 
     protected void serialize() throws IOException {
         addOutData(taskId);
-        addOutData(String.valueOf(status.getStatusCode()));
+        addOutData(status.getStatusCode());
         if (status.getException() instanceof JobException) {
-            addOutData(String.valueOf(((JobException) status.getException()).getExitCode()));
+            addOutData(((JobException) status.getException()).getExitCode());
         }
         else {
-            addOutData("0");
+            addOutData(0);
         }
         StringBuffer sb = new StringBuffer();
         if (status.getMessage() != null) {



More information about the Swift-commit mailing list