ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r440812 - in /webservices/commons/trunk/modules/axiom/modules: axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/ axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/ axiom...
Date Wed, 06 Sep 2006 18:01:22 GMT
Author: chinthaka
Date: Wed Sep  6 11:01:21 2006
New Revision: 440812

URL: http://svn.apache.org/viewvc?view=rev&rev=440812
Log:
Removing un-necessary variable declarations

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?view=diff&rev=440812&r1=440811&r2=440812
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
Wed Sep  6 11:01:21 2006
@@ -15,28 +15,14 @@
  */
 package org.apache.axiom.om.impl.dom;
 
-import org.apache.axiom.om.OMAttribute;
-import org.apache.axiom.om.OMConstants;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.OMNode;
-import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.*;
 import org.apache.axiom.om.impl.OMNodeEx;
 import org.apache.axiom.om.impl.dom.factory.OMDOMFactory;
 import org.apache.axiom.om.impl.traverse.OMChildElementIterator;
 import org.apache.axiom.om.impl.util.EmptyIterator;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.om.util.ElementHelper;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.TypeInfo;
+import org.w3c.dom.*;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamConstants;
@@ -292,9 +278,8 @@
                     DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null);
             throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
         }
-        AttrImpl tempAttr = (AttrImpl) this.attributes.removeNamedItem(oldAttr
+        return (AttrImpl) this.attributes.removeNamedItem(oldAttr
                 .getName());
-        return tempAttr;
     }
 
     /*

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java?view=diff&rev=440812&r1=440811&r2=440812
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
Wed Sep  6 11:01:21 2006
@@ -66,15 +66,13 @@
 
         case Node.DOCUMENT_NODE:
             DocumentImpl docImpl = (DocumentImpl) parent;
-            ElementImpl elem2 = new ElementImpl(docImpl, localName,
+            return new ElementImpl(docImpl, localName,
                     (NamespaceImpl) ns, this);
-            return elem2;
 
         case Node.DOCUMENT_FRAGMENT_NODE:
             DocumentFragmentimpl docFragImpl = (DocumentFragmentimpl) parent;
-            ElementImpl elem3 = new ElementImpl((DocumentImpl) docFragImpl
+            return new ElementImpl((DocumentImpl) docFragImpl
                     .getOwnerDocument(), localName, (NamespaceImpl) ns, this);
-            return elem3;
         default:
             throw new OMDOMException(
                     "The parent container can only be an ELEMENT, DOCUMENT " +
@@ -104,10 +102,9 @@
 
         case Node.DOCUMENT_FRAGMENT_NODE:
             DocumentFragmentimpl docFragImpl = (DocumentFragmentimpl) parent;
-            ElementImpl elem3 = new ElementImpl((DocumentImpl) docFragImpl
+            return new ElementImpl((DocumentImpl) docFragImpl
                     .getOwnerDocument(), localName, (NamespaceImpl) ns,
                     builder, this);
-            return elem3;
         default:
             throw new OMDOMException(
                     "The parent container can only be an ELEMENT, DOCUMENT " +
@@ -210,8 +207,7 @@
      * @see org.apache.axiom.om.OMFactory#createOMText(java.lang.String)
      */
     public OMText createOMText(String s) {
-        TextImpl textImpl = new TextImpl(this.document,s, this);
-        return textImpl;
+        return new TextImpl(this.document,s, this);
     }
 
     /**

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java?view=diff&rev=440812&r1=440811&r2=440812
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
Wed Sep  6 11:01:21 2006
@@ -16,21 +16,10 @@
 
 package org.apache.axiom.soap.impl.dom;
 
-import org.apache.axiom.om.OMConstants;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.OMNode;
-import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.*;
 import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
 import org.apache.axiom.om.impl.dom.DocumentImpl;
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPBody;
-import org.apache.axiom.soap.SOAPConstants;
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axiom.soap.SOAPHeader;
-import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.*;
 import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory;
 
 import javax.xml.namespace.QName;
@@ -80,9 +69,7 @@
      * @throws OMException
      */
     public SOAPHeader getHeader() throws OMException {
-        SOAPHeader header =
-                (SOAPHeader) getFirstChildWithName(new QName(SOAPConstants.HEADER_LOCAL_NAME));
-        return header;
+        return (SOAPHeader) getFirstChildWithName(new QName(SOAPConstants.HEADER_LOCAL_NAME));
     }
 
     public void addChild(OMNode child) {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java?view=diff&rev=440812&r1=440811&r2=440812
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
Wed Sep  6 11:01:21 2006
@@ -18,11 +18,7 @@
 
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.soap.SOAPConstants;
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axiom.soap.SOAPFault;
-import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.*;
 import org.apache.axiom.soap.impl.llom.SOAPBodyImpl;
 
 public class SOAP12BodyImpl extends SOAPBodyImpl {
@@ -52,8 +48,7 @@
     }
 
     public SOAPFault addFault(Exception e) throws OMException {
-        SOAPFault soapFault = new SOAP12FaultImpl(this, e,
+        return new SOAP12FaultImpl(this, e,
                 (SOAPFactory) this.factory);
-        return soapFault;
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java?view=diff&rev=440812&r1=440811&r2=440812
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java
Wed Sep  6 11:01:21 2006
@@ -16,21 +16,8 @@
 
 package org.apache.axiom.om.factory;
 
-import org.apache.axiom.om.AbstractTestCase;
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.OMTestUtils;
-import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAPBody;
-import org.apache.axiom.soap.SOAPConstants;
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axiom.soap.SOAPFault;
-import org.apache.axiom.soap.SOAPHeader;
-import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axiom.om.*;
+import org.apache.axiom.soap.*;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -38,7 +25,6 @@
  * User: Eran Chinthaka (eran.chinthaka@gmail.com)
  * Date: Feb 8, 2005
  * Time: 11:06:09 AM
- * All Rights Reserved.
  */
 public class OMLinkedListImplFactoryTest extends AbstractTestCase {
 



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


Mime
View raw message