aboutsummaryrefslogtreecommitdiff
path: root/src/SelfIvyClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/SelfIvyClient.java')
-rw-r--r--src/SelfIvyClient.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/SelfIvyClient.java b/src/SelfIvyClient.java
index fbf4927..2751c92 100644
--- a/src/SelfIvyClient.java
+++ b/src/SelfIvyClient.java
@@ -65,7 +65,7 @@ public class SelfIvyClient extends IvyClient {
synchronized (threadedFlag) {
threadedFlag.put(key,type); // use autoboxing of boolean
}
- return key;
+ return key.intValue();
} catch (PatternSyntaxException ree) {
throw new IvyException("Invalid regexp " + sregexp);
}
@@ -73,14 +73,14 @@ public class SelfIvyClient extends IvyClient {
protected synchronized void unBindMsg(int id) throws IvyException {
Integer key = id;
- /*synchronized (regexps) { synchronized (callbacks) { synchronized (threadedFlag) {*/
+ synchronized (regexps) { synchronized (callbacks) { synchronized (threadedFlag) {
if ( ( regexps.remove(key) == null )
|| (regexpsText.remove(key) == null )
|| (callbacks.remove(key) == null )
|| (threadedFlag.remove(key) == null )
)
throw new IvyException("client wants to remove an unexistant regexp "+id);
- /*} } }*/
+ } } }
}
// unbinds to the first regexp
@@ -90,7 +90,7 @@ public class SelfIvyClient extends IvyClient {
for (Map.Entry<Integer,String> me : regexpsText.entrySet()) {
if ( me.getValue().equals(re) ) {
try {
- bus.unBindMsg(me.getKey());
+ bus.unBindMsg(me.getKey().intValue());
} catch (IvyException ie) {
return false;
}
@@ -101,7 +101,7 @@ public class SelfIvyClient extends IvyClient {
return false;
}
- protected synchronized int sendSelfMsg(String message) {
+ protected int sendSelfMsg(String message) {
int count = 0;
traceDebug("trying to send to self the message <"+message+">");
for (Integer key : regexps.keySet() ) {
@@ -128,7 +128,7 @@ public class SelfIvyClient extends IvyClient {
callback=callbacks.get(key);
}
if (callback==null) {
- traceDebug("Not regexp matching id "+key+", it must have been unsubscribed concurrently");
+ traceDebug("Not regexp matching id "+key.intValue()+", it must have been unsubscribed concurrently");
return;
// DONE check that nasty synchro issue, test suite: Request
}