[jbossws-commits] JBossWS SVN: r3545 - branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Tue Jun 12 04:39:59 EDT 2007
Author: heiko.braun at jboss.com
Date: 2007-06-12 04:39:59 -0400 (Tue, 12 Jun 2007)
New Revision: 3545
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/AddressingPropertiesImpl.java
Log:
Avoid double initilization
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/AddressingPropertiesImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/AddressingPropertiesImpl.java 2007-06-12 08:39:29 UTC (rev 3544)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/AddressingPropertiesImpl.java 2007-06-12 08:39:59 UTC (rev 3545)
@@ -80,6 +80,8 @@
private Map<QName, AddressingType> addrTypes = new HashMap<QName, AddressingType>();
+ private boolean initialized = false;
+
public AttributedURI getTo()
{
return to;
@@ -166,6 +168,8 @@
*/
public void initializeAsDestination(EndpointReference epr)
{
+ if(initialized) return;
+
if (epr == null)
throw new IllegalArgumentException("Invalid null endpoint reference");
@@ -178,6 +182,8 @@
soapElement.setAttributeNS(getNamespaceURI(), "wsa:IsReferenceParameter", "true");
addElement(soapElement);
}
+
+ this.initialized = true;
}
/**
@@ -193,6 +199,8 @@
*/
public void initializeAsReply(AddressingProperties props, boolean isFault)
{
+ if(initialized) return;
+
EndpointReference epr = (isFault ? props.getFaultTo() : null);
if (epr == null)
{
@@ -216,6 +224,8 @@
Relationship rel = builder.newRelationship(props.getMessageID().getURI());
this.relatesTo = new Relationship[] { rel };
}
+
+ this.initialized = true;
}
// Map interface ****************************************************************
More information about the jbossws-commits
mailing list