Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352127 - Library with string const field set to a literal "\r\n" generates an invalid Java value
Summary: Library with string const field set to a literal "\r\n" generates an invalid ...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 11:55 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:17 EST (History)
1 user (show)

See Also:


Attachments
Project archive file (45.07 KB, application/x-zip-compressed)
2011-07-14 11:55 EDT, Kathy Carroll CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.