You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2008/07/10 20:47:31 UTC

svn commit: r675676 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java

Author: scheu
Date: Thu Jul 10 11:47:30 2008
New Revision: 675676

URL: http://svn.apache.org/viewvc?rev=675676&view=rev
Log:
Adding synchronize to writeExternal.  
The logic in writeExternal causes om elements to be added to a temporary omtree for serialization.  
Without the synchronization, these common om elements can be queried/added by multiple threads....which results
in spurious NPE's in Axiom.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java?rev=675676&r1=675675&r2=675676&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java Thu Jul 10 11:47:30 2008
@@ -631,7 +631,7 @@
      * OMElements/Attributes, we need to actually serialize the OM structures
      * (at least in some cases.)
      */
-    public void writeExternal(java.io.ObjectOutput o)
+    public synchronized void writeExternal(java.io.ObjectOutput o)
             throws IOException {
         SafeObjectOutputStream out = SafeObjectOutputStream.install(o);