redundant cast: ensure only one cast from 2 same but equals casts is suggested as redundant (IDEA-135043)

This commit is contained in:
Anna Kozlova
2015-01-19 19:02:13 +01:00
parent 2fcc03f31f
commit d879e82ff1
3 changed files with 18 additions and 4 deletions
@@ -3,12 +3,17 @@
<problem>
<file>DoubleCast3.java</file>
<line>4</line>
<description>Casting '(String) o' to String is redundant</description>
<description>Casting 'o' to String is redundant</description>
</problem>
<problem>
<file>DoubleCast3.java</file>
<line>4</line>
<description>Casting 'o' to String is redundant</description>
<line>6</line>
<description>Casting '(String) s' to String is redundant</description>
</problem>
<problem>
<file>DoubleCast3.java</file>
<line>6</line>
<description>Casting 's' to String is redundant</description>
</problem>
</problems>
@@ -2,5 +2,7 @@ class Test{
static f(){
Object o;
String s = (String) (String) o;
String s2 = (String) (String) s;
}
}