Files
openide/java/java-tests/testData/inspection/java9CollectionFactory/beforeHashSetExplicitReusedVar.java
T

13 lines
288 B
Java

// "Replace with 'Set.of' call" "true"
import java.util.*;
public class Test {
public void test2() {
Set<String> set = new HashSet<>();
set.add("foo");
set.add("bar");
set.add("xyz");
set = Collections.unmodif<caret>iableSet(set);
System.out.println(set);
}
}