Title: [856] trunk/core/src/main/java/org/servicemix/jbi/framework/ComponentRegistry.java: Fixed school boy error spotted by Peter Smith -
- Revision
- 856
- Author
- rajdavies
- Date
- 2005-11-17 02:55:10 -0500 (Thu, 17 Nov 2005)
Log Message
Fixed school boy error spotted by Peter Smith -
where the test for existing membership of the idMap was using
the value rather than the key
Modified Paths
Diff
Modified: trunk/core/src/main/java/org/servicemix/jbi/framework/ComponentRegistry.java (855 => 856)
--- trunk/core/src/main/java/org/servicemix/jbi/framework/ComponentRegistry.java 2005-11-16 18:02:03 UTC (rev 855)
+++ trunk/core/src/main/java/org/servicemix/jbi/framework/ComponentRegistry.java 2005-11-17 07:55:10 UTC (rev 856)
@@ -138,7 +138,7 @@
* @param connector
*/
public void addComponentConnector(ComponentConnector connector) {
- if (!idMap.containsKey(connector)) {
+ if (connector != null && !idMap.containsKey(connector.getComponentNameSpace())) {
idMap.put(connector.getComponentNameSpace(), connector);
}
}
@@ -156,7 +156,9 @@
* @param connector
*/
public void updateConnector(ComponentConnector connector) {
- idMap.put(connector.getComponentNameSpace(), connector);
+ if (connector != null){
+ idMap.put(connector.getComponentNameSpace(), connector);
+ }
}