diff -r ef67566c49ea -r 568e70bbd9aa src/share/classes/com/sun/tools/javac/comp/Attr.java --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Wed Mar 14 13:53:41 2012 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Mon Mar 26 15:27:51 2012 +0100 @@ -2106,6 +2106,7 @@ if (exprtype.constValue() != null) owntype = cfolder.coerce(exprtype, owntype); result = check(tree, capture(owntype), VAL, resultInfo); + chk.checkRedundantCast(localEnv, tree); } public void visitTypeTest(JCInstanceOf tree) {