You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2016/02/21 20:21:09 UTC
svn commit: r1731553 - in /webservices/axiom/trunk:
aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/
axiom-api/src/main/java/org/apache/axiom/om/ src/site/apt/
src/site/markdown/release-notes/
Author: veithen
Date: Sun Feb 21 19:21:08 2016
New Revision: 1731553
URL: http://svn.apache.org/viewvc?rev=1731553&view=rev
Log:
AXIOM-445: Use DataHandler instead of Object in the createOMText API. Also update the release note.
Modified:
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
webservices/axiom/trunk/src/site/apt/roadmap.apt
webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java?rev=1731553&r1=1731552&r2=1731553&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java Sun Feb 21 19:21:08 2016
@@ -20,6 +20,7 @@ package org.apache.axiom.om.impl.common.
import static org.apache.axiom.util.xml.NSUtils.generatePrefix;
+import javax.activation.DataHandler;
import javax.xml.namespace.QName;
import org.apache.axiom.core.CoreModelException;
@@ -179,7 +180,7 @@ public class OMFactoryImpl implements OM
}
}
- public final OMText createOMText(Object dataHandler, boolean optimize) {
+ public final OMText createOMText(DataHandler dataHandler, boolean optimize) {
return createAxiomText(null, new TextContent(null, dataHandler, optimize), OMNode.TEXT_NODE);
}
Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java?rev=1731553&r1=1731552&r2=1731553&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java (original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java Sun Feb 21 19:21:08 2016
@@ -19,6 +19,7 @@
package org.apache.axiom.om;
+import javax.activation.DataHandler;
import javax.xml.namespace.QName;
import org.apache.axiom.ext.stax.datahandler.DataHandlerProvider;
@@ -284,7 +285,7 @@ public interface OMFactory {
OMText createOMText(String s, String mimeType, boolean optimize);
- OMText createOMText(Object dataHandler, boolean optimize);
+ OMText createOMText(DataHandler dataHandler, boolean optimize);
OMText createOMText(OMContainer parent, String s, String mimeType,
boolean optimize);
Modified: webservices/axiom/trunk/src/site/apt/roadmap.apt
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/src/site/apt/roadmap.apt?rev=1731553&r1=1731552&r2=1731553&view=diff
==============================================================================
--- webservices/axiom/trunk/src/site/apt/roadmap.apt (original)
+++ webservices/axiom/trunk/src/site/apt/roadmap.apt Sun Feb 21 19:21:08 2016
@@ -39,24 +39,6 @@ Introduction
API inconsistencies to be eliminated
-* Usage of <<<Object>>> instead of <<<DataHandler>>>
-
- There are several APIs that use <<<Object>>> although they expect or return
- a <<<DataHandler>>>. This is probably a legacy of Axis 1.x where the Activation API
- was an optional dependency. Today this no longer makes sense:
-
- * The Activation API is included in Java 6.
-
- * It is unlikely that Axiom actually works if Activation is not in the class path
- because there is nothing in the build that enforces or tests that and there are no
- known downstream projects that use Axiom without also depending on the Activation API.
-
- The following APIs will be changed to use <<<DataHandler>>> directly:
-
- * <<<OMText#getDataHandler()>>>
-
- * <<<OMFactory#createOMText(Object, boolean)>>>
-
* Methods declared by the wrong interface in the node type hierarchy
Some methods are declared at the wrong level in the node type hierarchy so that they may
Modified: webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md?rev=1731553&r1=1731552&r2=1731553&view=diff
==============================================================================
--- webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md (original)
+++ webservices/axiom/trunk/src/site/markdown/release-notes/1.3.0.md Sun Feb 21 19:21:08 2016
@@ -10,8 +10,25 @@ Changes in this release
* The public API now uses generics. Note that this should in general not have
impact on binary compatibility with Axiom 1.2.x.
-* The `getDataHandler()` method defined by `OMText` has been modified to use
- `DataHandler` instead of `Object` as return type.
+* In Axiom 1.2.x several APIs were using `Object` as argument/return type
+ although they expect/return a `DataHandler`. This is a legacy of Axis 1.x
+ where the Activation API was an optional dependency. This no longer makes
+ sense:
+
+ * In Java 6, the Activation API is part of the JRE.
+ * It is unlikely that Axiom actually works if the Activation API is not
+ available: there is nothing in the build that enforces or tests that,
+ and there are no known downstream projects that use Axiom without also
+ depending on the Activation API.
+
+ In Axiom 1.3.0, the following APIs have been changed to use `DataHandler`
+ instead of `Object`:
+
+ * `OMText.getDataHandler()`
+ * `OMFactory.createOMText(Object, boolean)`
+
+ Note that this change breaks binary compatibility with Axiom 1.2.x (but
+ shouldn't break source code compatibility).
* The builder implementations and related classes have been removed from the
`org.apache.axiom.om.impl.builder` and `org.apache.axiom.soap.impl.builder`