ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1735001 - in /webservices/axiom/trunk: aspects/core-aspects/src/main/java/org/apache/axiom/core/ aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/ aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/ aspects/do...
Date Mon, 14 Mar 2016 22:48:33 GMT
Author: veithen
Date: Mon Mar 14 22:48:33 2016
New Revision: 1735001

URL: http://svn.apache.org/viewvc?rev=1735001&view=rev
Log:
Swap the type parameters of the Mapper interface so that we can have IdentityMapper<S,T
extends S>: neither <T,S super T> nor <T extends S,S> are allowed and we want
to have the same order for the type parameters of Mapper and IdentityMapper.

Modified:
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElement.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNode.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/IdentityMapper.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/Mapper.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AbstractNodeIterator.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AttributeIterator.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/ElementsIterator.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/NodesIterator.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java
    webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/impl/mixin/CategoryContainerMixin.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/NamespaceDeclarationMapper.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElement.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElement.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElement.java
Mon Mar 14 22:48:33 2016
@@ -119,7 +119,7 @@ public interface CoreElement extends Cor
      */
     boolean coreRemoveAttribute(AttributeMatcher matcher, String namespaceURI, String name,
Semantics semantics);
     
-    <T extends CoreAttribute,S> Iterator<S> coreGetAttributesByType(Class<T>
type, Mapper<T,S> mapper, Semantics semantics);
+    <T extends CoreAttribute,S> Iterator<S> coreGetAttributesByType(Class<T>
type, Mapper<S,T> mapper, Semantics semantics);
     
     /**
      * Look up the namespace URI associated to the given prefix.

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNode.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNode.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNode.java
Mon Mar 14 22:48:33 2016
@@ -46,7 +46,7 @@ public interface CoreParentNode extends
     void coreSetState(int state);
     void coreBuild() throws CoreModelException;
 
-    <T> NodeIterator<T> coreGetNodes(Axis axis, Mapper<? super CoreNode,T>
mapper, Semantics semantics);
+    <T> NodeIterator<T> coreGetNodes(Axis axis, Mapper<T,? super CoreNode>
mapper, Semantics semantics);
 
-    <T extends CoreElement,S> NodeIterator<S> coreGetElements(Axis axis, Class<T>
type, ElementMatcher<? super T> matcher, String namespaceURI, String name, Mapper<?
super T,S> mapper, Semantics semantics);
+    <T extends CoreElement,S> NodeIterator<S> coreGetElements(Axis axis, Class<T>
type, ElementMatcher<? super T> matcher, String namespaceURI, String name, Mapper<S,?
super T> mapper, Semantics semantics);
 }

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/IdentityMapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/IdentityMapper.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/IdentityMapper.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/IdentityMapper.java
Mon Mar 14 22:48:33 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.axiom.core;
 
-public final class IdentityMapper<T> implements Mapper<T,T> {
-    public T map(T object) {
+public final class IdentityMapper<S,T extends S> implements Mapper<S,T> {
+    public S map(T object) {
         return object;
     }
 }

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/Mapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/Mapper.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/Mapper.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/Mapper.java
Mon Mar 14 22:48:33 2016
@@ -18,6 +18,6 @@
  */
 package org.apache.axiom.core;
 
-public interface Mapper<T,S> {
+public interface Mapper<S,T> {
     S map(T object);
 }

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AbstractNodeIterator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AbstractNodeIterator.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AbstractNodeIterator.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AbstractNodeIterator.java
Mon Mar 14 22:48:33 2016
@@ -34,7 +34,7 @@ public abstract class AbstractNodeIterat
     private final CoreParentNode startNode;
     private final Axis axis;
     private final Class<T> type;
-    private final Mapper<? super T,S> mapper;
+    private final Mapper<S,? super T> mapper;
     private final Semantics semantics;
     private T currentNode;
     
@@ -47,7 +47,7 @@ public abstract class AbstractNodeIterat
     private boolean hasNext;
     private int depth;
     
-    public AbstractNodeIterator(CoreParentNode startNode, Axis axis, Class<T> type,
Mapper<? super T,S> mapper, Semantics semantics) {
+    public AbstractNodeIterator(CoreParentNode startNode, Axis axis, Class<T> type,
Mapper<S,? super T> mapper, Semantics semantics) {
         this.startNode = startNode;
         this.axis = axis;
         this.type = type;

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AttributeIterator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AttributeIterator.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AttributeIterator.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/AttributeIterator.java
Mon Mar 14 22:48:33 2016
@@ -29,13 +29,13 @@ import org.apache.axiom.core.Semantics;
 
 public final class AttributeIterator<T extends CoreAttribute,S> implements Iterator<S>
{
     private final Class<T> type;
-    private final Mapper<T,S> mapper;
+    private final Mapper<S,T> mapper;
     private final Semantics semantics;
     private CoreAttribute currentAttribute;
     private CoreAttribute nextAttribute;
     private boolean nextAttributeSet;
     
-    private AttributeIterator(CoreAttribute firstAttribute, Class<T> type, Mapper<T,S>
mapper, Semantics semantics) {
+    private AttributeIterator(CoreAttribute firstAttribute, Class<T> type, Mapper<S,T>
mapper, Semantics semantics) {
         this.type = type;
         this.mapper = mapper;
         this.semantics = semantics;
@@ -43,7 +43,7 @@ public final class AttributeIterator<T e
         nextAttributeSet = true;
     }
     
-    public static <T extends CoreAttribute,S> Iterator<S> create(CoreElement
element, Class<T> type, Mapper<T,S> mapper, Semantics semantics) {
+    public static <T extends CoreAttribute,S> Iterator<S> create(CoreElement
element, Class<T> type, Mapper<S,T> mapper, Semantics semantics) {
         CoreAttribute attribute = element.coreGetFirstAttribute();
         while (attribute != null && !type.isInstance(attribute)) {
             attribute = attribute.coreGetNextAttribute();

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/ElementsIterator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/ElementsIterator.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/ElementsIterator.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/ElementsIterator.java
Mon Mar 14 22:48:33 2016
@@ -31,7 +31,7 @@ public final class ElementsIterator<T ex
     private final String namespaceURI;
     private final String name;
 
-    public ElementsIterator(CoreParentNode startNode, Axis axis, Class<T> type, ElementMatcher<?
super T> matcher, String namespaceURI, String name, Mapper<? super T,S> mapper, Semantics
semantics) {
+    public ElementsIterator(CoreParentNode startNode, Axis axis, Class<T> type, ElementMatcher<?
super T> matcher, String namespaceURI, String name, Mapper<S,? super T> mapper, Semantics
semantics) {
         super(startNode, axis, type, mapper, semantics);
         this.matcher = matcher;
         this.namespaceURI = namespaceURI;

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/NodesIterator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/NodesIterator.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/NodesIterator.java
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/NodesIterator.java
Mon Mar 14 22:48:33 2016
@@ -27,7 +27,7 @@ import org.apache.axiom.core.Semantics;
 
 public final class NodesIterator<S> extends AbstractNodeIterator<CoreNode,S>
{
     public NodesIterator(CoreParentNode startNode, Axis axis,
-            Mapper<? super CoreNode, S> mapper, Semantics semantics) {
+            Mapper<S,? super CoreNode> mapper, Semantics semantics) {
         super(startNode, axis, CoreNode.class, mapper, semantics);
     }
 

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementSupport.aj
Mon Mar 14 22:48:33 2016
@@ -134,7 +134,7 @@ public aspect CoreElementSupport {
         }
     }
 
-    public final <T extends CoreAttribute,S> Iterator<S> CoreElement.coreGetAttributesByType(Class<T>
type, Mapper<T,S> mapper, Semantics semantics) {
+    public final <T extends CoreAttribute,S> Iterator<S> CoreElement.coreGetAttributesByType(Class<T>
type, Mapper<S,T> mapper, Semantics semantics) {
         return AttributeIterator.create(this, type, mapper, semantics);
     }
 

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj
Mon Mar 14 22:48:33 2016
@@ -362,11 +362,11 @@ public aspect CoreParentNodeSupport {
         }
     }
     
-    public final <T> NodeIterator<T> CoreParentNode.coreGetNodes(Axis axis, Mapper<?
super CoreNode,T> mapper, Semantics semantics) {
+    public final <T> NodeIterator<T> CoreParentNode.coreGetNodes(Axis axis, Mapper<T,?
super CoreNode> mapper, Semantics semantics) {
         return new NodesIterator<T>(this, axis, mapper, semantics);
     }
     
-    public final <T extends CoreElement,S> NodeIterator<S> CoreParentNode.coreGetElements(Axis
axis, Class<T> type, ElementMatcher<? super T> matcher, String namespaceURI, String
name, Mapper<? super T,S> mapper, Semantics semantics) {
+    public final <T extends CoreElement,S> NodeIterator<S> CoreParentNode.coreGetElements(Axis
axis, Class<T> type, ElementMatcher<? super T> matcher, String namespaceURI, String
name, Mapper<S,? super T> mapper, Semantics semantics) {
         return new ElementsIterator<T,S>(this, axis, type, matcher, namespaceURI, name,
mapper, semantics);
     }
 

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java
Mon Mar 14 22:48:33 2016
@@ -26,7 +26,7 @@ import org.apache.axiom.core.ElementMatc
 import org.apache.axiom.core.Mapper;
 import org.w3c.dom.Node;
 
-public class ElementsByTagName extends NodeListImpl implements Mapper<CoreElement,Node>
{
+public class ElementsByTagName extends NodeListImpl implements Mapper<Node,CoreElement>
{
     private final DOMParentNode node;
     private final String tagname;
     

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java
(original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java
Mon Mar 14 22:48:33 2016
@@ -27,7 +27,7 @@ import org.apache.axiom.core.ElementMatc
 import org.apache.axiom.core.Mapper;
 import org.w3c.dom.Node;
 
-public class ElementsByTagNameNS extends NodeListImpl implements Mapper<CoreElement,Node>
{
+public class ElementsByTagNameNS extends NodeListImpl implements Mapper<Node,CoreElement>
{
     private final DOMParentNode node;
     private final String namespaceURI;
     private final String localName;

Modified: webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/impl/mixin/CategoryContainerMixin.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/impl/mixin/CategoryContainerMixin.aj?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/impl/mixin/CategoryContainerMixin.aj
(original)
+++ webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/impl/mixin/CategoryContainerMixin.aj
Mon Mar 14 22:48:33 2016
@@ -56,7 +56,7 @@ public aspect CategoryContainerMixin {
         return _getChildrenAsSet(Constants.CATEGORY);
     }
 
-    private static final Mapper<AbderaCategory,Category> categoryMapper = new Mapper<AbderaCategory,Category>()
{
+    private static final Mapper<Category,AbderaCategory> categoryMapper = new Mapper<Category,AbderaCategory>()
{
         public Category map(AbderaCategory category) {
             return category;
         }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/NamespaceDeclarationMapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/NamespaceDeclarationMapper.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/NamespaceDeclarationMapper.java
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/NamespaceDeclarationMapper.java
Mon Mar 14 22:48:33 2016
@@ -22,7 +22,7 @@ import org.apache.axiom.core.Mapper;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.intf.AxiomNamespaceDeclaration;
 
-public class NamespaceDeclarationMapper implements Mapper<AxiomNamespaceDeclaration,OMNamespace>
{
+public class NamespaceDeclarationMapper implements Mapper<OMNamespace,AxiomNamespaceDeclaration>
{
     public static final NamespaceDeclarationMapper INSTANCE = new NamespaceDeclarationMapper();
     
     private NamespaceDeclarationMapper() {}

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
Mon Mar 14 22:48:33 2016
@@ -162,7 +162,7 @@ public aspect AxiomContainerSupport {
         }
     }
     
-    private static final Mapper<CoreNode,OMNode> childrenMapper = new Mapper<CoreNode,OMNode>()
{
+    private static final Mapper<OMNode,CoreNode> childrenMapper = new Mapper<OMNode,CoreNode>()
{
         public OMNode map(CoreNode node) {
             return (OMNode)node;
         }
@@ -172,7 +172,7 @@ public aspect AxiomContainerSupport {
         return coreGetNodes(Axis.CHILDREN, childrenMapper, AxiomSemantics.INSTANCE);
     }
 
-    private static final Mapper<CoreNSAwareElement,OMElement> childElementMapper =
new Mapper<CoreNSAwareElement,OMElement>() {
+    private static final Mapper<OMElement,CoreNSAwareElement> childElementMapper =
new Mapper<OMElement,CoreNSAwareElement>() {
         public OMElement map(CoreNSAwareElement element) {
             return (OMElement)element;
         }
@@ -195,7 +195,7 @@ public aspect AxiomContainerSupport {
         return new OMChildrenQNameIterator(getFirstOMChild(), elementQName);
     }
     
-    private static final Mapper<CoreNode,OMSerializable> descendantsMapper = new Mapper<CoreNode,OMSerializable>()
{
+    private static final Mapper<OMSerializable,CoreNode> descendantsMapper = new Mapper<OMSerializable,CoreNode>()
{
         public OMSerializable map(CoreNode node) {
             return (OMSerializable)node;
         }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj
Mon Mar 14 22:48:33 2016
@@ -42,6 +42,7 @@ import org.apache.axiom.core.CoreModelEx
 import org.apache.axiom.core.CoreParentNode;
 import org.apache.axiom.core.ElementAction;
 import org.apache.axiom.core.ElementMatcher;
+import org.apache.axiom.core.IdentityMapper;
 import org.apache.axiom.core.Mapper;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMConstants;
@@ -111,7 +112,7 @@ public aspect AxiomElementSupport {
         return null;
     }
 
-    private static final Mapper<CoreElement,OMElement> childElementMapper = new Mapper<CoreElement,OMElement>()
{
+    private static final Mapper<OMElement,CoreElement> childElementMapper = new Mapper<OMElement,CoreElement>()
{
         public OMElement map(CoreElement element) {
             return (OMElement)element;
         }
@@ -345,11 +346,7 @@ public aspect AxiomElementSupport {
         return addAttribute(getOMFactory().createOMAttribute(localName, namespace, value));
     }
 
-    private static final Mapper<AxiomAttribute,OMAttribute> attributeMapper = new Mapper<AxiomAttribute,OMAttribute>()
{
-        public OMAttribute map(AxiomAttribute object) {
-            return object;
-        }
-    };
+    private static final Mapper<OMAttribute,AxiomAttribute> attributeMapper = new IdentityMapper<OMAttribute,AxiomAttribute>();
     
     public final Iterator<OMAttribute> AxiomElement.getAllAttributes() {
         return coreGetAttributesByType(AxiomAttribute.class, attributeMapper, AxiomSemantics.INSTANCE);

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?rev=1735001&r1=1735000&r2=1735001&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
(original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Mon Mar 14 22:48:33 2016
@@ -234,7 +234,7 @@ public class FOMElement extends FOMChild
         }
     }
 
-    private static final IdentityMapper<AbderaElement> abderaElementMapper = new IdentityMapper<AbderaElement>();
+    private static final IdentityMapper<AbderaElement,AbderaElement> abderaElementMapper
= new IdentityMapper<AbderaElement,AbderaElement>();
     
     public final Iterator<AbderaElement> _getChildrenWithName(QName qname) {
         return coreGetElements(Axis.CHILDREN, AbderaElement.class, ElementMatcher.BY_QNAME,



Mime
View raw message