mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-inspections] A test with loop for CastCanBeReplacedWithVariable inspection
GitOrigin-RevId: 4b785ae09e7e5adc579a8ac37e3bc671ac559517
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f84e0b42a8
commit
552ffd1a79
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace '(String) obj' with 's'" "true"
|
||||
|
||||
class X {
|
||||
void test(Object obj) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
String s = (String) obj;
|
||||
System.out.println(s);
|
||||
System.out.println(s);
|
||||
s = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace '(String) obj' with 's'" "true"
|
||||
|
||||
class X {
|
||||
void test(Object obj) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
String s = (String) obj;
|
||||
System.out.println(s);
|
||||
System.out.println((String<caret>) obj);
|
||||
s = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user