The following 2 Sys Outs produce the commented error/warning. First line's error is correct, and compilation fails, but the second line should NOT flag a warning as the explicit cast IS required for the line to compile and be valid.
public static void main( String[] args )
{
System.out.println( null + null ); // Operator '+' cannot be applied to 'null', 'null' [correct]
System.out.println( null + (String)null ); // Casting 'null' to 'String' is redundant [incorrect]
}
Pretty minor, but should report errors/warnings consistent with the JLS/compiler.