mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-13 08:19:05 +07:00
add support for binary operation reduction in stream migration
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with reduce()" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
public void testBitwiseOr() {
|
||||
int[] arr = new int[]{1, 2, 3, 4};
|
||||
int acc = 12443;
|
||||
acc |= Arrays.stream(arr).reduce(0, (a, b) -> a | b);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user