Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352127

Summary: Library with string const field set to a literal "\r\n" generates an invalid Java value
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Project archive file none

Description Kathy Carroll CLA 2011-07-14 11:55:21 EDT
Build Identifier: 0.7.0

My library contains this variable declaration

   const NEWLINE string = "\r\n";

When I generate my project, the resulting java code has this error:

String literal is not properly closed by a double-quote 

at this line of code

		NEWLINE = "
		";

I couldn't reproduce the problem when I tried to create a simple library with just this declaration.

Reproducible: Always

Steps to Reproduce:
1. Import the project from the attached archive file
2. Create the src folder
3. Clean the project
4. Get a java error
Comment 1 Kathy Carroll CLA 2011-07-14 11:55:56 EDT
Created attachment 199676 [details]
Project archive file
Comment 2 Jeff Douglas CLA 2011-07-14 16:19:49 EDT
Paul, this looks like there is something wrong in core. The xml that gets generated has the literal value with x'0a0909090909' which isn't correct.
Then when the generator gets it, expr.getValue() returns 6 spaces.

I'm passing this over to you.
Comment 3 Kathy Carroll CLA 2011-08-15 15:22:54 EDT
has been fixed
Comment 4 Kathy Carroll CLA 2011-08-15 15:23:03 EDT
verified
Comment 5 Lisa Lasher CLA 2011-10-11 16:00:06 EDT
Closing this defect.