Bug 317584 - Commented line throws Compiler error and Runtime exception
Summary: Commented line throws Compiler error and Runtime exception
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-22 10:26 EDT by madjic CLA
Modified: 2010-08-04 16:10 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description madjic CLA 2010-06-22 10:26:14 EDT
Build Identifier: 20100218-1602

Compiler can't handle the Unicode representation of linefeed (\u000a) as a character, but interprets it as a linefeed. therefore even commenting out the line in question doesn't help, because everything after \u000a is interpreted as a new line

Reproducible: Always

Steps to Reproduce:
String string = String.valueOf(matrix[i][j]);
//	   string.replace("\u000a", "LF");
Comment 1 Olivier Thomann CLA 2010-06-22 15:45:02 EDT
There is nothing wrong with this.
Closing as INVALID.
Comment 2 Jay Arthanareeswaran CLA 2010-08-04 02:44:07 EDT
Olivier, I am getting this error with I20100802-1800:

"String literal is not properly closed by a double-quote"

However, I don't get it when I use "\u001a" or "\u000c". Were you saying the error was expected?
Comment 3 Olivier Thomann CLA 2010-08-04 13:59:28 EDT
(In reply to comment #2)
> Olivier, I am getting this error with I20100802-1800:
> 
> "String literal is not properly closed by a double-quote"
> 
> However, I don't get it when I use "\u001a" or "\u000c". Were you saying the
> error was expected?
Jay,

Please send your test case. I'll take a look again.
Comment 4 Olivier Thomann CLA 2010-08-04 16:10:24 EDT
Since \u000a is processed before the source is parsed. It means that the line comment ends with this character and what is coming next is seen as a new line.
The code is wrong and the errors are expected.
Verified for 3.7M1.