diff options
author | jestin | 2012-04-26 16:20:17 +0000 |
---|---|---|
committer | jestin | 2012-04-26 16:20:17 +0000 |
commit | c9cd13dd8ec1a636ba3e5f9cdb86e599c75fff6c (patch) | |
tree | 53f6af1584404432c73b1ea7d1dbad0d87288503 /src/SelfIvyClient.java | |
parent | ac8c6c0d9bb921166697e9b13009f9ff83ba9716 (diff) | |
download | ivy-java-c9cd13dd8ec1a636ba3e5f9cdb86e599c75fff6c.zip ivy-java-c9cd13dd8ec1a636ba3e5f9cdb86e599c75fff6c.tar.gz ivy-java-c9cd13dd8ec1a636ba3e5f9cdb86e599c75fff6c.tar.bz2 ivy-java-c9cd13dd8ec1a636ba3e5f9cdb86e599c75fff6c.tar.xz |
Corrects a small bug on "unbind Msg" based on the regexp string. Fixes an
issue on IvyProbe, mainly, should not affect other types of agents, which
shoud rely on the id returned during the bind msg.
Diffstat (limited to 'src/SelfIvyClient.java')
-rw-r--r-- | src/SelfIvyClient.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SelfIvyClient.java b/src/SelfIvyClient.java index 3e9ba6a..2cfc016 100644 --- a/src/SelfIvyClient.java +++ b/src/SelfIvyClient.java @@ -83,11 +83,11 @@ public class SelfIvyClient extends IvyClient { // unbinds to the first regexp protected synchronized boolean unBindMsg(String re) { synchronized (regexpsText) { - if (regexpsText.get(re) == null) return false; - for (Integer k : regexpsText.keySet()) { - if ( (regexpsText.get(k)).compareTo(re) == 0) { + if (!regexpsText.containsValue(re)) return false; + for (Map.Entry<Integer,String> me : regexpsText.entrySet()) { + if ( me.getValue().equals(re) ) { try { - bus.unBindMsg(k.intValue()); + bus.unBindMsg(me.getKey().intValue()); } catch (IvyException ie) { return false; } |