ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1704114 - in /webservices/axiom/trunk: ./ implementations/ implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/ implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/
Date Sun, 20 Sep 2015 09:51:36 GMT
Author: veithen
Date: Sun Sep 20 09:51:36 2015
New Revision: 1704114

URL: http://svn.apache.org/viewvc?rev=1704114&view=rev
Log:
Ensure that implementations have no package cycles.

Added:
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOMStAXParserConfiguration.java
      - copied, changed from r1704088, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOMStAXParserConfiguration.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java
      - copied, changed from r1704088, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilderFactory.java
      - copied, changed from r1704088, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java
Removed:
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/
Modified:
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
    webservices/axiom/trunk/implementations/pom.xml
    webservices/axiom/trunk/pom.xml

Copied: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOMStAXParserConfiguration.java
(from r1704088, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOMStAXParserConfiguration.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOMStAXParserConfiguration.java?p2=webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOMStAXParserConfiguration.java&p1=webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOMStAXParserConfiguration.java&r1=1704088&r2=1704114&rev=1704114&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOMStAXParserConfiguration.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOMStAXParserConfiguration.java
Sun Sep 20 09:51:36 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.om.impl.dom.jaxp;
+package org.apache.axiom.om.impl.dom.factory;
 
 import javax.xml.stream.XMLInputFactory;
 

Copied: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java
(from r1704088, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java?p2=webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java&p1=webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java&r1=1704088&r2=1704114&rev=1704114&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java
Sun Sep 20 09:51:36 2015
@@ -17,14 +17,12 @@
  * under the License.
  */
 
-package org.apache.axiom.om.impl.dom.jaxp;
+package org.apache.axiom.om.impl.dom.factory;
 
 import org.apache.axiom.dom.DOMDocument;
+import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.dom.DOMMetaFactory;
-import org.apache.axiom.om.impl.dom.DocumentImpl;
-import org.apache.axiom.om.impl.dom.factory.DOOMNodeFactory;
 import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
@@ -41,7 +39,7 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 
-public class DOOMDocumentBuilder extends DocumentBuilder {
+final class DOOMDocumentBuilder extends DocumentBuilder {
     private final OMFactory factory;
     private final StAXParserConfiguration parserConfiguration;
     private final Schema schema;
@@ -98,11 +96,10 @@ public class DOOMDocumentBuilder extends
     }
 
     public Document parse(InputSource inputSource) throws SAXException, IOException {
-        OMXMLParserWrapper builder = factory.getMetaFactory().createOMBuilder(factory,
-                parserConfiguration, inputSource);
-        DocumentImpl doc = (DocumentImpl) builder.getDocument();
-        doc.close(true);
-        return doc;
+        OMDocument document = factory.getMetaFactory().createOMBuilder(factory,
+                parserConfiguration, inputSource).getDocument();
+        document.close(true);
+        return (Document)document;
     }
 
     public Document parse(InputStream is) throws SAXException, IOException {

Copied: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilderFactory.java
(from r1704088, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilderFactory.java?p2=webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilderFactory.java&p1=webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java&r1=1704088&r2=1704114&rev=1704114&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilderFactory.java
Sun Sep 20 09:51:36 2015
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.axiom.om.impl.dom.jaxp;
+package org.apache.axiom.om.impl.dom.factory;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -25,26 +25,15 @@ import javax.xml.parsers.ParserConfigura
 import javax.xml.validation.Schema;
 
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.dom.DOMMetaFactory;
-import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
 
 /**
  * Document builder factory that conforms to JAXP.
  */
-public class DOOMDocumentBuilderFactory extends DocumentBuilderFactory {
+final class DOOMDocumentBuilderFactory extends DocumentBuilderFactory {
     private final OMFactory factory;
     private Schema schema;
     
-    /**
-     * @deprecated Application code should not instantiate this class directly, but use
-     *             {@link DOMMetaFactory#newDocumentBuilderFactory()} to get an Axiom compatible
-     *             {@link DocumentBuilderFactory}.
-     */
-    public DOOMDocumentBuilderFactory() {
-        this(OMDOMMetaFactory.INSTANCE.getOMFactory());
-    }
-    
-    public DOOMDocumentBuilderFactory(OMFactory factory) {
+    DOOMDocumentBuilderFactory(OMFactory factory) {
         this.factory = factory;
     }
     

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java?rev=1704114&r1=1704113&r2=1704114&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
Sun Sep 20 09:51:36 2015
@@ -25,7 +25,6 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.dom.DOMMetaFactory;
 import org.apache.axiom.om.impl.common.factory.AbstractOMMetaFactory;
 import org.apache.axiom.om.impl.common.factory.OMFactoryImpl;
-import org.apache.axiom.om.impl.dom.jaxp.DOOMDocumentBuilderFactory;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.common.AxiomSOAPMessage;
 import org.apache.axiom.soap.impl.common.SOAP11Factory;

Modified: webservices/axiom/trunk/implementations/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/pom.xml?rev=1704114&r1=1704113&r2=1704114&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/pom.xml (original)
+++ webservices/axiom/trunk/implementations/pom.xml Sun Sep 20 09:51:36 2015
@@ -111,6 +111,23 @@
                     </dependency>
                 </dependencies>
             </plugin>
+            <plugin>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>enforce-no-package-cycles</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <phase>process-classes</phase>
+                        <configuration>
+                            <rules>
+                                <noPackageCycles implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule"
/>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 

Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1704114&r1=1704113&r2=1704114&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sun Sep 20 09:51:36 2015
@@ -626,7 +626,14 @@
                 </plugin>
                 <plugin>
                     <artifactId>maven-enforcer-plugin</artifactId>
-                    <version>1.1</version>
+                    <version>1.4.1</version>
+                    <dependencies>
+                        <dependency>
+                            <groupId>de.andrena.tools.nopackagecycles</groupId>
+                            <artifactId>no-package-cycles-enforcer-rule</artifactId>
+                            <version>1.0.4</version>
+                        </dependency>
+                    </dependencies>
                 </plugin>
                 <plugin>
                     <artifactId>maven-compiler-plugin</artifactId>



Mime
View raw message