ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1728799 - in /webservices/axiom/trunk: aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/ aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/ aspects/om-aspects/src/main/java/org/apache/axiom/om...
Date Sat, 06 Feb 2016 09:20:23 GMT
Author: veithen
Date: Sat Feb  6 09:20:23 2016
New Revision: 1728799

URL: http://svn.apache.org/viewvc?rev=1728799&view=rev
Log:
Remove unused code.

Modified:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/builder/StAXSOAPModelBuilder.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java?rev=1728799&r1=1728798&r2=1728799&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java
Sat Feb  6 09:20:23 2016
@@ -38,7 +38,6 @@ import org.apache.axiom.om.impl.builder.
 import org.apache.axiom.om.impl.builder.Detachable;
 import org.apache.axiom.om.impl.intf.AxiomContainer;
 import org.apache.axiom.om.impl.intf.AxiomElement;
-import org.apache.axiom.om.impl.intf.OMFactoryEx;
 import org.apache.axiom.om.impl.intf.TextContent;
 import org.apache.axiom.util.stax.XMLEventUtils;
 import org.apache.axiom.util.stax.XMLStreamReaderUtils;
@@ -93,9 +92,6 @@ public class StAXOMBuilder implements Bu
     /** Field parser */
     private XMLStreamReader parser;
 
-    // TODO: this will eventually disappear in favor of NodeFactory
-    private final OMFactoryEx omfactory;
-    
     private final Detachable detachable;
     private final Closeable closeable;
     
@@ -136,10 +132,9 @@ public class StAXOMBuilder implements Bu
     
     private final BuilderHandler handler;
 
-    private StAXOMBuilder(NodeFactory nodeFactory, OMFactory omFactory, XMLStreamReader parser,
String encoding,
+    private StAXOMBuilder(NodeFactory nodeFactory, XMLStreamReader parser, String encoding,
             boolean autoClose, Detachable detachable, Closeable closeable, Model model, PayloadSelector
payloadSelector) {
         handler = new BuilderHandler(nodeFactory, model, this);
-        omfactory = (OMFactoryEx)omFactory;
         this.parser = parser;
         this.autoClose = autoClose;
         this.detachable = detachable;
@@ -149,24 +144,24 @@ public class StAXOMBuilder implements Bu
         dataHandlerReader = XMLStreamReaderUtils.getDataHandlerReader(parser);
     }
     
-    protected StAXOMBuilder(NodeFactory nodeFactory, OMFactory omFactory, XMLStreamReader
parser, boolean autoClose,
+    protected StAXOMBuilder(NodeFactory nodeFactory, XMLStreamReader parser, boolean autoClose,
             Detachable detachable, Closeable closeable, Model model, PayloadSelector payloadSelector)
{
         // The getEncoding information is only available at the START_DOCUMENT event.
-        this(nodeFactory, omFactory, parser, parser.getEncoding(), autoClose, detachable,
closeable, model, payloadSelector);
+        this(nodeFactory, parser, parser.getEncoding(), autoClose, detachable, closeable,
model, payloadSelector);
         
     }
     
-    public StAXOMBuilder(NodeFactory nodeFactory, OMFactory omFactory, XMLStreamReader parser,
boolean autoClose,
+    public StAXOMBuilder(NodeFactory nodeFactory, XMLStreamReader parser, boolean autoClose,
             Detachable detachable, Closeable closeable) {
-        this(nodeFactory, omFactory, parser, autoClose, detachable, closeable, PlainXMLModel.INSTANCE,
PayloadSelector.DEFAULT);
+        this(nodeFactory, parser, autoClose, detachable, closeable, PlainXMLModel.INSTANCE,
PayloadSelector.DEFAULT);
     }
     
-    public StAXOMBuilder(NodeFactory nodeFactory, OMFactory factory, 
+    public StAXOMBuilder(NodeFactory nodeFactory,
                          XMLStreamReader parser, 
                          OMElement element, 
                          String characterEncoding) {
         // Use this constructor because the parser is passed the START_DOCUMENT state.
-        this(nodeFactory, factory, parser, characterEncoding, true, null, null, PlainXMLModel.INSTANCE,
PayloadSelector.DEFAULT);  
+        this(nodeFactory, parser, characterEncoding, true, null, null, PlainXMLModel.INSTANCE,
PayloadSelector.DEFAULT);  
         handler.elementLevel = 1;
         handler.target = (AxiomContainer)element;
         populateOMElement(element);
@@ -786,7 +781,7 @@ public class StAXOMBuilder implements Bu
             // This is relevant for OMSourcedElements and for the case where the document
has been discarded
             // using getDocumentElement(true). In these cases, this will actually set target
to null. In all
             // other cases, this will have the same effect as the instruction in the else
clause.
-            handler.target = (AxiomContainer)handler.document;
+            handler.target = handler.document;
         } else {
             handler.target = (AxiomContainer)((OMElement)handler.target).getParent();
         }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java?rev=1728799&r1=1728798&r2=1728799&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
Sat Feb  6 09:20:23 2016
@@ -167,12 +167,12 @@ public abstract class AbstractOMMetaFact
     }
     
     public OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser)
{
-        return new StAXOMBuilder(nodeFactory, omFactory, getXMLStreamReader(parser), false,
(Detachable)null, (Closeable)null);
+        return new StAXOMBuilder(nodeFactory, getXMLStreamReader(parser), false, (Detachable)null,
(Closeable)null);
     }
 
     public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, StAXParserConfiguration
configuration, InputSource is) {
         SourceInfo sourceInfo = createXMLStreamReader(configuration, is, true);
-        return new StAXOMBuilder(nodeFactory, omFactory, sourceInfo.getReader(), true,
+        return new StAXOMBuilder(nodeFactory, sourceInfo.getReader(), true,
                 sourceInfo.getDetachable(), sourceInfo.getCloseable());
     }
     
@@ -195,7 +195,7 @@ public abstract class AbstractOMMetaFact
                     toInputSource((StreamSource)source));
         } else {
             try {
-                return new StAXOMBuilder(nodeFactory, omFactory, StAXUtils.getXMLInputFactory().createXMLStreamReader(source),
true, (Detachable)null, (Closeable)null);
+                return new StAXOMBuilder(nodeFactory, StAXUtils.getXMLInputFactory().createXMLStreamReader(source),
true, (Detachable)null, (Closeable)null);
             } catch (XMLStreamException ex) {
                 throw new OMException(ex);
             }
@@ -204,7 +204,7 @@ public abstract class AbstractOMMetaFact
 
     public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Node node,
             boolean expandEntityReferences) {
-        return new StAXOMBuilder(nodeFactory, omFactory, new DOMXMLStreamReader(node, expandEntityReferences),
true, (Detachable)null, (Closeable)null);
+        return new StAXOMBuilder(nodeFactory, new DOMXMLStreamReader(node, expandEntityReferences),
true, (Detachable)null, (Closeable)null);
     }
 
     // TODO: don't need the omFactory argument anymore
@@ -218,7 +218,6 @@ public abstract class AbstractOMMetaFact
         SourceInfo sourceInfo = createXMLStreamReader(configuration, rootPart, false);
         return new StAXOMBuilder(
                 nodeFactory, 
-                omFactory,
                 new XOPDecodingStreamReader(sourceInfo.getReader(), mimePartProvider),
                 true,
                 mimePartProvider instanceof Detachable ? (Detachable)mimePartProvider : null,
@@ -226,12 +225,12 @@ public abstract class AbstractOMMetaFact
     }
 
     public SOAPModelBuilder createStAXSOAPModelBuilder(XMLStreamReader parser) {
-        return new StAXSOAPModelBuilder(nodeFactory, this, getXMLStreamReader(parser), false,
null, null);
+        return new StAXSOAPModelBuilder(nodeFactory, getXMLStreamReader(parser), false, null,
null);
     }
 
     public SOAPModelBuilder createSOAPModelBuilder(StAXParserConfiguration configuration,
InputSource is) {
         SourceInfo sourceInfo = createXMLStreamReader(configuration, is, true);
-        return new StAXSOAPModelBuilder(nodeFactory, this, sourceInfo.getReader(), true,
+        return new StAXSOAPModelBuilder(nodeFactory, sourceInfo.getReader(), true,
                 sourceInfo.getDetachable(), sourceInfo.getCloseable());
     }
 
@@ -240,13 +239,13 @@ public abstract class AbstractOMMetaFact
             // TODO: supporting this will require some refactoring of the builders
             throw new UnsupportedOperationException();
         } else if (source instanceof DOMSource) {
-            return new StAXSOAPModelBuilder(nodeFactory, this, new DOMXMLStreamReader(((DOMSource)source).getNode(),
true), true, (Detachable)null, (Closeable)null);
+            return new StAXSOAPModelBuilder(nodeFactory, new DOMXMLStreamReader(((DOMSource)source).getNode(),
true), true, (Detachable)null, (Closeable)null);
         } else if (source instanceof StreamSource) {
             return createSOAPModelBuilder(StAXParserConfiguration.SOAP,
                     toInputSource((StreamSource)source));
         } else {
             try {
-                return new StAXSOAPModelBuilder(nodeFactory, this, StAXUtils.getXMLInputFactory().createXMLStreamReader(source),
true, (Detachable)null, (Closeable)null);
+                return new StAXSOAPModelBuilder(nodeFactory, StAXUtils.getXMLInputFactory().createXMLStreamReader(source),
true, (Detachable)null, (Closeable)null);
             } catch (XMLStreamException ex) {
                 throw new OMException(ex);
             }
@@ -258,7 +257,6 @@ public abstract class AbstractOMMetaFact
         SourceInfo sourceInfo = createXMLStreamReader(configuration, rootPart, false);
         StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(
                 nodeFactory,
-                soapFactory.getMetaFactory(),
                 new XOPDecodingStreamReader(sourceInfo.getReader(), mimePartProvider),
                 true,
                 mimePartProvider instanceof Detachable ? (Detachable)mimePartProvider : null,

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj?rev=1728799&r1=1728798&r2=1728799&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
Sat Feb  6 09:20:23 2016
@@ -250,7 +250,7 @@ public aspect AxiomSourcedElementSupport
                 // Set the builder for this element. Note that the StAXOMBuilder constructor
will also
                 // update the namespace of the element, so we don't need to do that here.
                 isExpanded = true;
-                coreSetBuilder(new StAXOMBuilder(coreGetNodeFactory(), getOMFactory(), readerFromDS,
this, characterEncoding));
+                coreSetBuilder(new StAXOMBuilder(coreGetNodeFactory(), readerFromDS, this,
characterEncoding));
                 setComplete(false);
             }
         }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/builder/StAXSOAPModelBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/builder/StAXSOAPModelBuilder.java?rev=1728799&r1=1728798&r2=1728799&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/builder/StAXSOAPModelBuilder.java
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/builder/StAXSOAPModelBuilder.java
Sat Feb  6 09:20:23 2016
@@ -23,7 +23,6 @@ import java.io.Closeable;
 
 import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMSerializable;
 import org.apache.axiom.om.impl.builder.Detachable;
 import org.apache.axiom.om.impl.common.builder.NodePostProcessor;
@@ -41,9 +40,9 @@ import javax.xml.stream.XMLStreamReader;
  * Internal implementation class.
  */
 public class StAXSOAPModelBuilder extends StAXOMBuilder implements SOAPModelBuilder {
-    public StAXSOAPModelBuilder(NodeFactory nodeFactory, OMMetaFactory metaFactory, XMLStreamReader
parser,
+    public StAXSOAPModelBuilder(NodeFactory nodeFactory, XMLStreamReader parser,
             boolean autoClose, Detachable detachable, Closeable closeable) {
-        super(nodeFactory, metaFactory.getOMFactory(), parser, autoClose, detachable, closeable,
new SOAPModel(),
+        super(nodeFactory, parser, autoClose, detachable, closeable, new SOAPModel(),
                 SOAPPayloadSelector.INSTANCE);
         // The SOAPFactory instance linked to the SOAPMessage is unknown until we reach the
         // SOAPEnvelope. Register a post-processor that does the necessary updates on the

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java?rev=1728799&r1=1728798&r2=1728799&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
(original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
Sat Feb  6 09:20:23 2016
@@ -42,7 +42,7 @@ public class FOMBuilder extends StAXOMBu
     private final ParserOptions parserOptions;
 
     public FOMBuilder(final FOMFactory factory, XMLStreamReader parser, ParserOptions parserOptions)
{
-        super(FOMNodeFactory.INSTANCE, factory, new FOMStAXFilter(parser, parserOptions),
false, (Detachable)null, (Closeable)null,
+        super(FOMNodeFactory.INSTANCE, new FOMStAXFilter(parser, parserOptions), false, (Detachable)null,
(Closeable)null,
                 factory, PayloadSelector.DEFAULT);
         this.parserOptions = parserOptions;
         this.fomfactory = factory;



Mime
View raw message