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:11:31 UTC

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

Author: dkulp
Date: Fri Mar  2 21:11:31 2012
New Revision: 1296470

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

........
  r1296465 | dkulp | 2012-03-02 16:09:09 -0500 (Fri, 02 Mar 2012) | 17 lines
  
  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.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

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

Modified: cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1296470&r1=1296469&r2=1296470&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Fri Mar  2 21:11:31 2012
@@ -491,6 +491,7 @@ public class HTTPConduit 
                                           getClient().getDecoupledEndpoint());
         }
         if (clientSidePolicy != null) {
+            clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice
             clientSidePolicy.addPropertyChangeListener(this);
         }
     }
@@ -866,7 +867,10 @@ public class HTTPConduit 
             }
             //defaultEndpointURL = null;
         }
-    
+        
+        if (clientSidePolicy != null) {
+            clientSidePolicy.removePropertyChangeListener(this);
+        }
     }
 
     /**
@@ -1391,8 +1395,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());
     }