You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/03/02 22:09:10 UTC

svn commit: r1296465 - in /cxf/branches/2.4.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Author: dkulp
Date: Fri Mar  2 21:09:09 2012
New Revision: 1296465

URL: http://svn.apache.org/viewvc?rev=1296465&view=rev
Log:
Merged revisions 1296461 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1296461 | dkulp | 2012-03-02 16:06:41 -0500 (Fri, 02 Mar 2012) | 9 lines
  
  Merged revisions 1296453 via  svn merge from
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1296453 | dkulp | 2012-03-02 15:53:46 -0500 (Fri, 02 Mar 2012) | 1 line
    
    [CXF-4131] Make sure the conduit is only added as a listener once
  ........
  
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1296465&r1=1296464&r2=1296465&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Fri Mar  2 21:09:09 2012
@@ -417,6 +417,7 @@ public class HTTPConduit 
                                           getClient().getDecoupledEndpoint());
         }
         if (clientSidePolicy != null) {
+            clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice
             clientSidePolicy.addPropertyChangeListener(this);
         }
     }
@@ -705,7 +706,10 @@ public class HTTPConduit 
             }
             //defaultEndpointURL = null;
         }
-    
+        
+        if (clientSidePolicy != null) {
+            clientSidePolicy.removePropertyChangeListener(this);
+        }
     }
 
     /**
@@ -854,8 +858,12 @@ public class HTTPConduit 
      * method will override any HTTPClientPolicy set in configuration.
      */
     public void setClient(HTTPClientPolicy client) {
+        if (this.clientSidePolicy != null) {
+            this.clientSidePolicy.removePropertyChangeListener(this);
+        }
         this.clientSidePolicy = client;
-        client.addPropertyChangeListener(this);
+        clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice
+        clientSidePolicy.addPropertyChangeListener(this);
         endpointInfo.setProperty("org.apache.cxf.ws.addressing.replyto", client.getDecoupledEndpoint());
     }