mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
StreamApiMigration: register comments from post-loop operations like sorting
This commit is contained in:
+3
@@ -5,6 +5,9 @@ import java.util.stream.Stream;
|
||||
|
||||
public class Test {
|
||||
public void testSetListSort(String[] args) {
|
||||
// foo
|
||||
// bar
|
||||
/*baz*/
|
||||
System.out.println(Arrays.stream(args).distinct().sorted().toArray());
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -6,8 +6,8 @@ import java.util.stream.Stream;
|
||||
public class Test {
|
||||
public void testSetListSort(String[] args) {
|
||||
Set<String> set = Arrays.stream(args).co<caret>llect(Collectors.toSet());
|
||||
List<String> list = new ArrayList<>(set);
|
||||
list.sort(null);
|
||||
System.out.println(list.toArray());
|
||||
List<String> list = new ArrayList<>(set); // foo
|
||||
list.sort(null); // bar
|
||||
System.out.println(list.toArray(/*baz*/));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user