You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by di...@apache.org on 2006/07/11 16:02:51 UTC
svn commit: r420851 -
/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
Author: dims
Date: Tue Jul 11 07:02:51 2006
New Revision: 420851
URL: http://svn.apache.org/viewvc?rev=420851&view=rev
Log:
prevent org.apache.axis2.addressing.EndpointReferenceTypeTest from failing in JDK 1.6.0-beta2 - basically by keeping the ordering of the attributes intact
Modified:
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=420851&r1=420850&r2=420851&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java Tue Jul 11 07:02:51 2006
@@ -45,6 +45,7 @@
import java.io.ByteArrayOutputStream;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
/**
* Class OMElementImpl
@@ -487,7 +488,7 @@
*/
public OMAttribute addAttribute(OMAttribute attr) {
if (attributes == null) {
- this.attributes = new HashMap(5);
+ this.attributes = new LinkedHashMap(5);
}
OMNamespace namespace = attr.getNamespace();
if (namespace != null && this.findNamespace(namespace.getName(), namespace.getPrefix()) == null)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
Re: svn commit: r420851 - /webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
Posted by Davanum Srinivas <da...@gmail.com>.
Was trying to get more of the code built before we make that decision
:) at least we know there is one test (EndpointReferenceTypeTest) that
depends on the order of attributes.
-- dims
On 7/11/06, Dennis Sosnoski <dm...@sosnoski.com> wrote:
> Hi dims,
>
> If there's a test depending on the ordering of the attributes staying
> intact, is the test really appropriate? A parser can report the
> attributes in any order it wants. Switching to LinkedHashMap is going to
> add more overhead (not a lot, but every bit hurts).
>
> - Dennis
>
> dims@apache.org wrote:
> > Author: dims
> > Date: Tue Jul 11 07:02:51 2006
> > New Revision: 420851
> >
> > URL: http://svn.apache.org/viewvc?rev=420851&view=rev
> > Log:
> > prevent org.apache.axis2.addressing.EndpointReferenceTypeTest from failing in JDK 1.6.0-beta2 - basically by keeping the ordering of the attributes intact
> >
> > Modified:
> > webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
> >
> > Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
> > URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=420851&r1=420850&r2=420851&view=diff
> > ==============================================================================
> > --- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java (original)
> > +++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java Tue Jul 11 07:02:51 2006
> > @@ -45,6 +45,7 @@
> > import java.io.ByteArrayOutputStream;
> > import java.util.HashMap;
> > import java.util.Iterator;
> > +import java.util.LinkedHashMap;
> >
> > /**
> > * Class OMElementImpl
> > @@ -487,7 +488,7 @@
> > */
> > public OMAttribute addAttribute(OMAttribute attr) {
> > if (attributes == null) {
> > - this.attributes = new HashMap(5);
> > + this.attributes = new LinkedHashMap(5);
> > }
> > OMNamespace namespace = attr.getNamespace();
> > if (namespace != null && this.findNamespace(namespace.getName(), namespace.getPrefix()) == null)
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: commons-dev-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: commons-dev-help@ws.apache.org
>
>
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
Re: svn commit: r420851 - /webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi dims,
If there's a test depending on the ordering of the attributes staying
intact, is the test really appropriate? A parser can report the
attributes in any order it wants. Switching to LinkedHashMap is going to
add more overhead (not a lot, but every bit hurts).
- Dennis
dims@apache.org wrote:
> Author: dims
> Date: Tue Jul 11 07:02:51 2006
> New Revision: 420851
>
> URL: http://svn.apache.org/viewvc?rev=420851&view=rev
> Log:
> prevent org.apache.axis2.addressing.EndpointReferenceTypeTest from failing in JDK 1.6.0-beta2 - basically by keeping the ordering of the attributes intact
>
> Modified:
> webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
>
> Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
> URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=420851&r1=420850&r2=420851&view=diff
> ==============================================================================
> --- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java (original)
> +++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java Tue Jul 11 07:02:51 2006
> @@ -45,6 +45,7 @@
> import java.io.ByteArrayOutputStream;
> import java.util.HashMap;
> import java.util.Iterator;
> +import java.util.LinkedHashMap;
>
> /**
> * Class OMElementImpl
> @@ -487,7 +488,7 @@
> */
> public OMAttribute addAttribute(OMAttribute attr) {
> if (attributes == null) {
> - this.attributes = new HashMap(5);
> + this.attributes = new LinkedHashMap(5);
> }
> OMNamespace namespace = attr.getNamespace();
> if (namespace != null && this.findNamespace(namespace.getName(), namespace.getPrefix()) == null)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: commons-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org