[Mashup-dev] svn commit r18912 - trunk/mashup/java/modules/core/src/org/wso2/mashup/utils

keith at wso2.com keith at wso2.com
Mon Jul 7 10:15:13 PDT 2008


Author: keith
Date: Mon Jul  7 10:15:13 2008
New Revision: 18912
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18912

Log:
Minor code cleanup


Modified:
   trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java

Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java
URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java?rev=18912&r1=18911&r2=18912&view=diff
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java	(original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java	Mon Jul  7 10:15:13 2008
@@ -43,12 +43,9 @@
 import org.apache.axis2.util.JavaUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.HttpException;
 import org.apache.commons.httpclient.HttpMethod;
 import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
 import org.apache.commons.httpclient.protocol.Protocol;
@@ -1287,7 +1284,7 @@
 
         // Read in the bytes
         int offset = 0;
-        int numRead = 0;
+        int numRead;
         while (offset < bytes.length
                 && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) {
             offset += numRead;
@@ -1359,9 +1356,8 @@
         String username =
                 (String) currentMessageContext.getAxisService().getParameterValue(
                         MashupConstants.MASHUP_AUTHOR_NAME);
-        ProtocolSocketFactory psf = new CustomProtocolSocketFactory(
-                MashupUtils.getUserKeystoreResource(username));
-        return psf;
+        return new CustomProtocolSocketFactory(
+                MashupUtils.getUserKeystoreResourclece(username));
     }
 
     /**



More information about the Mashup-dev mailing list