diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-12-05 15:09:18 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-12-05 15:09:18 +0100 |
commit | 5124965c25862fa450509beddfa7266effacddfd (patch) | |
tree | 6b1cb4b983eb36d6b4d7c4ebeb7687b1832318ca /java/src | |
parent | Added support for service commands to icegridadmin (bug 1775) (diff) | |
download | ice-5124965c25862fa450509beddfa7266effacddfd.tar.bz2 ice-5124965c25862fa450509beddfa7266effacddfd.tar.xz ice-5124965c25862fa450509beddfa7266effacddfd.zip |
Fixed NPE in the outgoing connection factory
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/IceInternal/ConnectRequestHandler.java | 4 | ||||
-rw-r--r-- | java/src/IceInternal/OutgoingConnectionFactory.java | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/java/src/IceInternal/ConnectRequestHandler.java b/java/src/IceInternal/ConnectRequestHandler.java index 45aa6c959b9..792674f62ac 100644 --- a/java/src/IceInternal/ConnectRequestHandler.java +++ b/java/src/IceInternal/ConnectRequestHandler.java @@ -246,6 +246,7 @@ public class ConnectRequestHandler { synchronized(this) { + assert(_connection == null && _exception == null); _connection = connection; _compress = compress; } @@ -271,6 +272,7 @@ public class ConnectRequestHandler { synchronized(this) { + assert(!_initialized && _exception == null); _exception = ex; _proxy = null; // Break cyclic reference count. _delegate = null; // Break cyclic reference count. @@ -373,7 +375,7 @@ public class ConnectRequestHandler { synchronized(this) { - assert(_connection != null); + assert(_connection != null && !_initialized); if(_batchRequestInProgress) { diff --git a/java/src/IceInternal/OutgoingConnectionFactory.java b/java/src/IceInternal/OutgoingConnectionFactory.java index fb3108aa472..601b522bf10 100644 --- a/java/src/IceInternal/OutgoingConnectionFactory.java +++ b/java/src/IceInternal/OutgoingConnectionFactory.java @@ -814,7 +814,7 @@ public final class OutgoingConnectionFactory private void finishGetConnection(java.util.List connectors, ConnectCallback cb, Ice.ConnectionI connection) { - java.util.ArrayList callbacks = new java.util.ArrayList(); + java.util.Set callbacks = new java.util.HashSet(); synchronized(this) { |