mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
redundant cast: check only array access for write separately (IDEA-82003)
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>A.java</file>
|
||||
<line>6</line>
|
||||
<description>Casting <code>t</code> to <code>Foo</code> is redundant</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>A.java</file>
|
||||
<line>5</line>
|
||||
<description>Casting <code>t</code> to <code>Foo</code> is redundant</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
abstract class Foo {
|
||||
protected int field;
|
||||
|
||||
public int f(Bar t){
|
||||
((Foo)t).field = 0;
|
||||
return ((Foo)t).field;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Bar extends Foo{}
|
||||
Reference in New Issue
Block a user