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:06:41 UTC
svn commit: r1296461 - in /cxf/branches/2.5.x-fixes: ./
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Author: dkulp
Date: Fri Mar 2 21:06:41 2012
New Revision: 1296461
URL: http://svn.apache.org/viewvc?rev=1296461&view=rev
Log:
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.5.x-fixes/ (props changed)
cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1296461&r1=1296460&r2=1296461&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Fri Mar 2 21:06:41 2012
@@ -418,6 +418,7 @@ public class HTTPConduit
getClient().getDecoupledEndpoint());
}
if (clientSidePolicy != null) {
+ clientSidePolicy.removePropertyChangeListener(this); //make sure we aren't added twice
clientSidePolicy.addPropertyChangeListener(this);
}
}
@@ -706,7 +707,10 @@ public class HTTPConduit
}
//defaultEndpointURL = null;
}
-
+
+ if (clientSidePolicy != null) {
+ clientSidePolicy.removePropertyChangeListener(this);
+ }
}
/**
@@ -855,8 +859,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());
}