diff options
author | jestin | 2005-11-22 15:46:35 +0000 |
---|---|---|
committer | jestin | 2005-11-22 15:46:35 +0000 |
commit | 52744777dd21f84dd40303ee197f0b5517dd96e0 (patch) | |
tree | e936b6710d59e5a6f7f5c9eee777db90e0e00dc3 /src/Ivy.java | |
parent | 26978bdb988da5539e2cf01dcfc13fda00577c87 (diff) | |
download | ivy-java-52744777dd21f84dd40303ee197f0b5517dd96e0.zip ivy-java-52744777dd21f84dd40303ee197f0b5517dd96e0.tar.gz ivy-java-52744777dd21f84dd40303ee197f0b5517dd96e0.tar.bz2 ivy-java-52744777dd21f84dd40303ee197f0b5517dd96e0.tar.xz |
Ha ha, does anyone read the comments in CVS ?
Diffstat (limited to 'src/Ivy.java')
-rwxr-xr-x | src/Ivy.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/Ivy.java b/src/Ivy.java index 0b5168a..e97b29a 100755 --- a/src/Ivy.java +++ b/src/Ivy.java @@ -14,6 +14,7 @@ * * CHANGELOG: * 1.2.8: + * - addclient and removeclient going synchronized * - domainaddr goes protected in Domain ( gij compatibility ) * - checks if (Client)e.nextElement() each time we want to ... * Multithreaded Enumerations ..., should fix [YJnul05] @@ -692,14 +693,19 @@ public class Ivy implements Runnable { } private synchronized long nextId() { return current++; } - void addClient(IvyClient c) { - synchronized (clients) { clients.put(c.getClientKey(),c); } - traceDebug("added "+c+" in clients: "+getClientNames(clients)); + synchronized void addClient(IvyClient c) { + if (clients==null||c==null) return; + synchronized (clients) { + clients.put(c.getClientKey(),c); + traceDebug("added "+c+" in clients: "+getClientNames(clients)); + } } - void removeClient(IvyClient c) { - synchronized (clients) {clients.remove(c.getClientKey());} - traceDebug("removed "+c+" from clients: "+getClientNames(clients)); + synchronized void removeClient(IvyClient c) { + synchronized (clients) { + clients.remove(c.getClientKey()); + traceDebug("removed "+c+" from clients: "+getClientNames(clients)); + } } void addHalf(IvyClient c) { @@ -708,6 +714,7 @@ public class Ivy implements Runnable { } void removeHalf(IvyClient c) { + if (half==null||c==null) return; synchronized(half){half.remove(c.getClientKey());} traceDebug("removed "+c+" from half: "+getClientNames(half)); } |