mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
[uast-groovy] UInjectionHost support
GitOrigin-RevId: 49ec454d1831796fa63b77fdc965f61985bf877e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c33e69a545
commit
9b850726ee
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
Value is always false (x > 6 && y > 10)
|
||||
Operand #1 of &&-chain is false (x > 6)
|
||||
Left operand is 5 (x)
|
||||
'x' was assigned (5)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(int y) {
|
||||
int x = 5;
|
||||
if(<selection>x > 6 && y > 10</selection>) {}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
Value is always false (a > 5 && b < 0 && b > a)
|
||||
One of the following happens:
|
||||
Operand #1 of &&-chain is false (a > 5)
|
||||
or operand #2 of &&-chain is false (b < 0)
|
||||
or operand #3 of &&-chain is false (b > a)
|
||||
Left operand is <= -1 (b)
|
||||
Range is known from line #15 (b < 0)
|
||||
and right operand is >= 6 (a)
|
||||
Range is known from line #15 (a > 5)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(int a, int b) {
|
||||
if(<selection>a > 5 && b < 0 && b > a</selection>) {}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
Value is always false (s.length == list.size())
|
||||
Left operand is >= 1 (s.length)
|
||||
Range is known from line #12 (s[0])
|
||||
and right operand is 0 (list.size())
|
||||
Right operand is 0 (list.size())
|
||||
Range is known from line #13 (list.isEmpty())
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
Value is always true (b)
|
||||
'b' was assigned (true)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
boolean b = true;
|
||||
if(<selection>b</selection>) {}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Value is always false (s == null)
|
||||
's' was assigned (s1)
|
||||
Condition 's1 != null' was checked before (s1 == null)
|
||||
s1 != null was checked before (s1 == null)
|
||||
*/
|
||||
class Test {
|
||||
void test(String s, String s1) {
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
Value is always false (x == null)
|
||||
One of the following happens:
|
||||
'x' was assigned (new Object())
|
||||
Expression cannot be null as it's newly created object (new Object())
|
||||
or 'x' was assigned ("foo")
|
||||
Expression cannot be null as it's literal ("foo")
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(boolean b) {
|
||||
Object x;
|
||||
if (b) {
|
||||
x = new Object();
|
||||
} else {
|
||||
x = "foo";
|
||||
}
|
||||
if (<selection>x == null</selection>) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
Value is always false (y == null)
|
||||
'y' was assigned (x)
|
||||
One of the following happens:
|
||||
'x' was assigned (new Object())
|
||||
Expression cannot be null as it's newly created object (new Object())
|
||||
or 'x' was assigned ("foo")
|
||||
Expression cannot be null as it's literal ("foo")
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(boolean b) {
|
||||
Object x;
|
||||
if (b) {
|
||||
x = new Object();
|
||||
} else {
|
||||
x = "foo";
|
||||
}
|
||||
Object y = x;
|
||||
if (<selection>y == null</selection>) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
Value is always true (j >= 0)
|
||||
Left operand is >= 0 (j)
|
||||
'j' was assigned (i + 1)
|
||||
Result of '+' is >= 0 (i + 1)
|
||||
Left operand is in {-1..Integer.MAX_VALUE-1} (i)
|
||||
'i' was assigned (s.indexOf(' '))
|
||||
Value is in {-1..Integer.MAX_VALUE-1} (s.indexOf(' '))
|
||||
*/
|
||||
|
||||
class Test {
|
||||
private static void dosmth(String s) {
|
||||
int i = s.indexOf(' ');
|
||||
int j = i + 1;
|
||||
if (<selection>j >= 0</selection>) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
Value is always false (s instanceof String)
|
||||
An object is known to be Number which is definitely incompatible with String (s)
|
||||
Type of 's' is known from line #10 (s instanceof Number)
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void test(Object s) {
|
||||
if (s instanceof Number) {
|
||||
if (s instanceof Integer) {
|
||||
if (<selection>s instanceof String</selection>){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
Value is always true (s instanceof RandomAccess)
|
||||
An object is already known to be ArrayList which is a subtype of RandomAccess (s)
|
||||
Type of 's' is known from line #12 (s instanceof ArrayList)
|
||||
*/
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
void test(Object s) {
|
||||
if (s instanceof Map) {
|
||||
if (s instanceof List) {
|
||||
if (s instanceof ArrayList) {
|
||||
if (s instanceof CharSequence) {
|
||||
if (<selection>s instanceof RandomAccess</selection>){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
Value is always false (s instanceof Integer)
|
||||
An object type is exactly String which is not a subtype of Integer (s)
|
||||
Type of 's' is known from line #10 (s instanceof String)
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void test(Object s) {
|
||||
if (s instanceof String) {
|
||||
if (<selection>s instanceof Integer</selection>) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
Value is always false (s instanceof String)
|
||||
Value 's' is always 'null' (s)
|
||||
's == null' was established from condition (s == null)
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void test(Object s) {
|
||||
if (s == null && <selection>s instanceof String</selection>) {}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
Value is always true (s instanceof String)
|
||||
An object is already known to be String (s)
|
||||
Type of 's' is known from line #10 ((String)s)
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void test(Object s) {
|
||||
System.out.println(((String)s).trim());
|
||||
|
||||
|
||||
if (<selection>s instanceof String</selection>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
Value is always true (s instanceof CharSequence)
|
||||
An object type is exactly String which is a subtype of CharSequence (s)
|
||||
Type of 's' is known from line #10 (s instanceof String)
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void test(Object s) {
|
||||
if (s instanceof String) {
|
||||
if (<selection>s instanceof CharSequence</selection>) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
Value is always false (s instanceof String)
|
||||
An object is known to be not CharSequence which is a supertype of String (s)
|
||||
Type of 's' is known from line #10 (s instanceof CharSequence)
|
||||
*/
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
void test(Object s) {
|
||||
if (!(s instanceof CharSequence)) {
|
||||
if (s instanceof Integer) {
|
||||
if (<selection>s instanceof String</selection>){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
Value is always true ((s = new Object()) != null)
|
||||
's' was assigned (new Object())
|
||||
Expression cannot be null as it's newly created object (new Object())
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
Object s;
|
||||
if (<selection>(s = new Object()) != null</selection>) {}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
Value is always true (s != null)
|
||||
's' was assigned (new Object())
|
||||
Expression cannot be null as it's newly created object (new Object())
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
Object s = (new Object());
|
||||
if (<selection>s != null</selection>) {}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Value is always false (null == s)
|
||||
Parameter 's' is annotated as 'non-null' (@NotNull)
|
||||
Parameter 's' is annotated as 'non-null' (@NotNull String s)
|
||||
*/
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
May be null (s)
|
||||
's' was assigned (loadString())
|
||||
Method 'loadString' is annotated as 'nullable' (@Nullable)
|
||||
*/
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
String s = loadString();
|
||||
System.out.println(<selection>s</selection>.trim());
|
||||
}
|
||||
|
||||
native @Nullable String loadString();
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
May be null (s)
|
||||
An execution might exist where:
|
||||
's' is known to be 'null' from line #9 (s == null)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(String s) {
|
||||
if (s == null) {
|
||||
System.out.println(s);
|
||||
}
|
||||
System.out.println(<selection>s</selection>.trim());
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
May be null (foo)
|
||||
'foo' was assigned (getFoo())
|
||||
Method 'getFoo' is annotated as 'nullable' (@Nullable)
|
||||
*/
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class Test {
|
||||
|
||||
void test(Object x) {
|
||||
String foo = (String)getFoo();
|
||||
System.out.println(<selection>foo</selection>.trim());
|
||||
}
|
||||
|
||||
@Nullable native Object getFoo();
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Value is always false (s == null)
|
||||
Condition 's != null' was checked before (null == s)
|
||||
s != null was checked before (null == s)
|
||||
*/
|
||||
class Test {
|
||||
void test(String s) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Value is always false (s == s1)
|
||||
's1' was assigned (null)
|
||||
and condition 's != null' was checked before (null == s)
|
||||
s != null was checked before (null == s)
|
||||
*/
|
||||
class Test {
|
||||
void test(String s) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Value is always false (x * 2 == y * 2 + 1)
|
||||
Result of '*' is even (x * 2)
|
||||
and result of '+' is odd (y * 2 + 1)
|
||||
Result of '+' is odd (y * 2 + 1)
|
||||
Result of '*' is even (y * 2)
|
||||
*/
|
||||
class Test {
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
Value is always true (x || (a+b)+(c+d)==10)
|
||||
One of the following happens:
|
||||
Operand #1 of ||-chain is true (x)
|
||||
or operand #2 of ||-chain is true ((a+b)+(c+d)==10)
|
||||
Result of '+' is 10 ((a+b)+(c+d))
|
||||
Result of '+' is 3 (a+b)
|
||||
Left operand is 1 (a)
|
||||
'a' was assigned (1)
|
||||
and right operand is 2 (b)
|
||||
'b' was assigned (2)
|
||||
and result of '+' is 7 (c+d)
|
||||
Left operand is 3 (c)
|
||||
'c' was assigned (3)
|
||||
and right operand is 4 (d)
|
||||
'd' was assigned (4)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(boolean x) {
|
||||
int a = 1, b = 2, c = 3, d = 4;
|
||||
if(<selection>x || (a+b)+(c+d)==10</selection>) {}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Value is always true (x <= y)
|
||||
Condition 'x <= y' was checked before (x > y)
|
||||
x <= y was checked before (x > y)
|
||||
*/
|
||||
class Test {
|
||||
void test(int x, int y) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Value is always true (x < y)
|
||||
Condition 'x < y' was checked before (x > y)
|
||||
x < y was checked before (x > y)
|
||||
*/
|
||||
class Test {
|
||||
void test(int x, int y) {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
Cast may fail ((Integer)x)
|
||||
An object type is exactly String which is not a subtype of Integer (x)
|
||||
Type of 'x' is known from line #9 (x instanceof String)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(Object x) {
|
||||
if (x instanceof String) {
|
||||
System.out.println(<selection>(Integer)x</selection>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
Cast may fail ((Integer)x)
|
||||
An execution might exist where:
|
||||
An object type is exactly Double which is not a subtype of Integer (x)
|
||||
Type of 'x' is known from line #14 (x instanceof Double)
|
||||
or an object type is exactly String which is not a subtype of Integer (x)
|
||||
Type of 'x' is known from line #12 (x instanceof String)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(Object x) {
|
||||
if (x instanceof String) {
|
||||
}
|
||||
if (x instanceof Double) {
|
||||
}
|
||||
System.out.println(<selection>(Integer)x</selection>);
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
Cast may fail ((Integer)x)
|
||||
An execution might exist where:
|
||||
An object type is exactly String which is not a subtype of Integer (x)
|
||||
Type of 'x' is known from line #10 (x instanceof String)
|
||||
*/
|
||||
|
||||
class Test {
|
||||
void test(Object x) {
|
||||
if (x instanceof String) {
|
||||
}
|
||||
System.out.println(<selection>(Integer)x</selection>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user