diff options
Diffstat (limited to 'java/src/IceInternal/OutgoingConnectionFactory.java')
-rw-r--r-- | java/src/IceInternal/OutgoingConnectionFactory.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/src/IceInternal/OutgoingConnectionFactory.java b/java/src/IceInternal/OutgoingConnectionFactory.java index f4822753730..53a1abbfc90 100644 --- a/java/src/IceInternal/OutgoingConnectionFactory.java +++ b/java/src/IceInternal/OutgoingConnectionFactory.java @@ -28,6 +28,7 @@ public final class OutgoingConnectionFactory list.add(value); } + /* public void removeElementWithValue(K key, V value) { @@ -39,6 +40,20 @@ public final class OutgoingConnectionFactory this.remove(key); } } + */ + + public boolean + removeElementWithValue(K key, V value) + { + java.util.List<V> list = this.get(key); + assert(list != null); + boolean v = list.remove(value); + if(list.isEmpty()) + { + this.remove(key); + } + return v; + } }; interface CreateConnectionCallback |