mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
fixed yellow code in PersistentFSImpl where VEvent was casted to subclass for the method different not-nullness
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>A.java</file>
|
||||
<line>5</line>
|
||||
<problem_class>Redundant type cast</problem_class>
|
||||
<description>Casting <code>a</code> to <code>AA</code> is redundant</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
class A {
|
||||
static String doit(A a) {
|
||||
String d = ((AA)a).danuna();
|
||||
String notNull = ((AA)a).doadd();
|
||||
return notNull + d;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
String doadd() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
String danuna() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
class AA extends A {
|
||||
@NotNull
|
||||
String doadd() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
String danuna() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user