Open vsavicks opened 8 years ago
The purpose of the code from line 77 is not clear:
if (connections.get(providerId).size() == 0) { connections.put(providerId, new LinkedList<Connection<?>>()); } connections.add(providerId, connection);
Does it simply replace an immutable list from line 73? I.e.
connections.put(registeredProviderId, Collections.<Connection<?>>emptyList());
If the providerId is not registered and hence absent in collections, won't it throw an NPE? If the connection is added whose providerId not registered, isn't it a problem that a registered connection factory for it will be absent?
providerId
collections
The purpose of the code from line 77 is not clear:
Does it simply replace an immutable list from line 73? I.e.
connections.put(registeredProviderId, Collections.<Connection<?>>emptyList());
If the
providerId
is not registered and hence absent incollections
, won't it throw an NPE? If the connection is added whoseproviderId
not registered, isn't it a problem that a registered connection factory for it will be absent?