History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3166
Type: Bug Bug
Status: Open Open
Assignee: Eugene Vigdorchik
Reporter: Andrew Walters
Votes: 0
Watchers: 1
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Java Lang Specification - null --> String cast error hilighting issue

Created: 27 Jun 05 19:59   Updated: 27 Jun 05 20:51
Component/s: Code Analysis. Inspection
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 3,378
Severity: Low


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.