mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
DFA: add missing box/unbox conversions
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
private final static Integer[] DATA = {119, 7, 3};
|
||||
private final static int[] DATA2 = {119, 7, 3};
|
||||
|
||||
void test() {
|
||||
for(int i=0; i<DATA.length; i++) {
|
||||
Integer val = DATA[i];
|
||||
int val2 = DATA2[i];
|
||||
if (val != val2) {
|
||||
System.out.println("Trouble");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,4 +59,8 @@ class MapUpdateInlining {
|
||||
System.out.println("impossible");
|
||||
}
|
||||
}
|
||||
|
||||
void testBoxing(Map<String, Integer> map, String key) {
|
||||
map.merge(key, 1, (i1, i2) -> i1+1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -620,4 +620,5 @@ public class DataFlowInspectionTest extends DataFlowInspectionTestCase {
|
||||
public void testNanComparisonWrong() { doTest(); }
|
||||
public void testConstantMethods() { doTest(); }
|
||||
public void testPolyadicEquality() { doTest(); }
|
||||
public void testBoxUnboxArrayElement() { doTest(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user