mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
redundant cast: ensure only one cast from 2 same but equals casts is suggested as redundant (IDEA-135043)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user