JDK 22 |
---|
22Unresolved |
Relates :
|
Some java/security classes apply the below coding style, Set<T> set = ...; Set<T> unmodifiableSet = Collections.unmodifiableSet(new HashSet<>(set)); It may be unnecessary to wrap that set with HashSet before creating unmodifiableSet. Some usages on Collections.unmodifiableList and Collections.unmodifiableMap have the same issue.
|