mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
[java-highlighting] Provide fixes for unexpected primitive type pattern: fixes after review (IJ-CR-15006)
GitOrigin-RevId: 7d13a79dbf52273c15f6d24b4957a68d8e1e9715
This commit is contained in:
committed by
intellij-monorepo-bot
parent
48d2830934
commit
23fbe72cac
@@ -0,0 +1,6 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
boolean b = o instanceof Integer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
boolean b = o instanceof Integer i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
switch (o) {
|
||||
case Integer i -> System.out.println("int");
|
||||
default -> System.out.println("default");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
boolean b = o instanceof int<caret>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "false"
|
||||
class Test {
|
||||
void foo(String o) {
|
||||
boolean b = o instanceof int<caret>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
boolean b = o instanceof int<caret> i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
class Test {
|
||||
void foo(Object o) {
|
||||
switch (o) {
|
||||
case int i<caret> -> System.out.println("int");
|
||||
default -> System.out.println("default");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace 'int' with 'java.lang.Integer'" "false"
|
||||
class Test {
|
||||
void foo(String o) {
|
||||
switch (o) {
|
||||
case int i<caret> -> System.out.println("int");
|
||||
default -> System.out.println("default");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user