ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r452311 - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/writer/ addressing/src/org/apache/axis2/addressing/ saaj/src/org/apache/axis2/saaj/util/ security/src/org/apache/ws/security/policy1/parser/
Date Tue, 03 Oct 2006 05:39:33 GMT
Author: chinthaka
Date: Mon Oct  2 22:39:32 2006
New Revision: 452311

URL: http://svn.apache.org/viewvc?view=rev&rev=452311
Log:
Removing un-necessary local variables

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/util/SAAJDataSource.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy1/parser/SecurityProcessorContext.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java?view=diff&rev=452311&r1=452310&r2=452311
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java
Mon Oct  2 22:39:32 2006
@@ -411,8 +411,7 @@
             XSLTUtils.addAttribute(model, "nsuri", name.getNamespaceURI(), property);
             XSLTUtils.addAttribute(model, "prefix", name.getPrefix(), property);
 
-            String CName = xmlName;//makeUniqueCStructName(propertyNames, xmlName);
-            XSLTUtils.addAttribute(model, "cname", CName, property);
+            XSLTUtils.addAttribute(model, "cname", xmlName, property);
 
 
             String CClassNameForElement = metainf.getClassNameForQName(name);
@@ -429,7 +428,7 @@
             /**
              * Caps for use in C macros
              */
-            XSLTUtils.addAttribute(model, "caps-cname", CName.toUpperCase(), property);
+            XSLTUtils.addAttribute(model, "caps-cname", xmlName.toUpperCase(), property);
             XSLTUtils.addAttribute(model, "caps-type", CClassNameForElement.toUpperCase(),
property);
 
             if (PrimitiveTypeFinder.isPrimitive(CClassNameForElement)){

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java?view=diff&rev=452311&r1=452310&r2=452311
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java
Mon Oct  2 22:39:32 2006
@@ -135,8 +135,7 @@
 
         messageContext.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
Boolean.FALSE);
         String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
-        AxisFault fault = new AxisFault(faultReason, new QName(namespace, faultcode, AddressingConstants.WSA_DEFAULT_PREFIX));
-        throw fault;
+        throw new AxisFault(faultReason, new QName(namespace, faultcode, AddressingConstants.WSA_DEFAULT_PREFIX));
     }
 
     private static void setFaultCode(MessageContext messageContext, String faultCode, String
faultSubCode) {

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/util/SAAJDataSource.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/util/SAAJDataSource.java?view=diff&rev=452311&r1=452310&r2=452311
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/util/SAAJDataSource.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/util/SAAJDataSource.java
Mon Oct  2 22:39:32 2006
@@ -277,11 +277,10 @@
             throw new java.io.IOException("streamClosed");
         }
 
-        int writesz = length;
         int byteswritten = 0;
 
         if ((null != memorybuflist)
-            && (totalsz + writesz > maxCached)) {    // Cache to disk.
+            && (totalsz + length > maxCached)) {    // Cache to disk.
             if (null == cachediskstream) {               // Need to create a disk cache
                 flushToDisk();
             }
@@ -297,7 +296,7 @@
                 }
 
                 // bytes to write is the min. between the remaining bytes and what is left
in this buffer.
-                int bytes2write = Math.min((writesz - byteswritten),
+                int bytes2write = Math.min((length - byteswritten),
                                            (currentMemoryBuf.length
                                             - currentMemoryBufSz));
 
@@ -309,18 +308,18 @@
                 currentMemoryBufSz += bytes2write;
 
                 if (byteswritten
-                    < writesz) {    // only get more if we really need it.
+                    < length) {    // only get more if we really need it.
                     currentMemoryBuf = new byte[READ_CHUNK_SZ];
                     currentMemoryBufSz = 0;
                     memorybuflist.add(currentMemoryBuf);    // add it to the chain.
                 }
-            } while (byteswritten < writesz);
+            } while (byteswritten < length);
         }
 
         if (null != cachediskstream) {    // Write to the out going stream.
             cachediskstream.write(data, 0, length);
         }
-        totalsz += writesz;
+        totalsz += length;
     }
 
 

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy1/parser/SecurityProcessorContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy1/parser/SecurityProcessorContext.java?view=diff&rev=452311&r1=452310&r2=452311
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy1/parser/SecurityProcessorContext.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy1/parser/SecurityProcessorContext.java
Mon Oct  2 22:39:32 2006
@@ -195,8 +195,7 @@
     public PolicyEngineData commitPolicyEngineData() {
         if (pedStackPointer > 2) {
             pedStackPointer--;
-            PolicyEngineData ped = (PolicyEngineData) pedStack.get(pedStackPointer);
-            return ped;
+            return (PolicyEngineData) pedStack.get(pedStackPointer);
         } else if(pedStackPointer == 2) {
             RootPolicyEngineData rootData = (RootPolicyEngineData)this.pedStack.get(0);
             rootData.addTopLevelPED(readCurrentPolicyEngineData());



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message