You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RiCache.getAll checks the argument "keys" with keys.contains(null). This check throws a NulllPointerException irrespective of the actual sets elements if the java.util.Set Implementation won't accept null as an element.
java.util.Set.contains documents that the method will throw a NullPointerException "if the specified element is null and this set does not permit null elements". Such Set can easily be obtained by a call to java.util.Collections.unmodifiableSet() or from objects of TreeSet (and possibly other implementations).
Ensuring that the argument "keys" won't contain any null elements should certainly throw a NullPointerException only if the Set happens to actually contain some null-Elements.
The text was updated successfully, but these errors were encountered:
RiCache.getAll checks the argument "keys" with keys.contains(null). This check throws a NulllPointerException irrespective of the actual sets elements if the java.util.Set Implementation won't accept null as an element.
RI/cache-ri-impl/src/main/java/org/jsr107/ri/RICache.java
Line 420 in 94b2c5d
java.util.Set.contains documents that the method will throw a NullPointerException "if the specified element is null and this set does not permit null elements". Such Set can easily be obtained by a call to java.util.Collections.unmodifiableSet() or from objects of TreeSet (and possibly other implementations).
Ensuring that the argument "keys" won't contain any null elements should certainly throw a NullPointerException only if the Set happens to actually contain some null-Elements.
The text was updated successfully, but these errors were encountered: