Bug 109940

Summary: [dom] IllegalArgumentException is thrown in CharacterLiteral.charValue()
Product: [Eclipse Project] JDT Reporter: Kelvin <kelvin>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Konstantin.Scheglov, philippe_mulet
Version: 3.1   
Target Milestone: 3.2 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Proposed fix
none
Regression test none

Description Kelvin CLA 2005-09-19 19:08:17 EDT
I am using v3.1.0
Build id :I20050627-1435

java.lang.IllegalArgumentException: illegal character literal
	at org.eclipse.jdt.core.dom.CharacterLiteral.charValue(CharacterLiteral.java:275)

test case :

public class Test {
   public void m(char c) {
        if (c == '\0') {
			
        }
	if (c == '\1') {
			
	}
	if (c == '\2') {
			
	}
	if (c == '\3') {
			
	}
	if (c == '\4') {
			
	}
	if (c == '\5') {
			
	}
	if (c == '\6') {
			
	}
	if (c == '\7') {
			
	}

   }
}
Comment 1 Olivier Thomann CLA 2005-09-20 21:27:19 EDT
Created attachment 27319 [details]
Proposed fix
Comment 2 Olivier Thomann CLA 2005-09-20 21:28:20 EDT
Philippe, do you want this one for 3.1.1 or 3.2M2?
Comment 3 Olivier Thomann CLA 2005-09-28 11:24:06 EDT
Created attachment 27618 [details]
Proposed fix
Comment 4 Olivier Thomann CLA 2005-09-28 11:35:07 EDT
Created attachment 27619 [details]
Regression test
Comment 5 Olivier Thomann CLA 2005-09-28 11:36:04 EDT
Fixed and released in HEAD.
Regression test added in
org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2.test0620
Comment 6 Olivier Thomann CLA 2005-10-04 09:04:26 EDT
*** Bug 92866 has been marked as a duplicate of this bug. ***
Comment 7 Frederic Fusier CLA 2005-10-31 03:47:45 EST
Verified for 3.2 M3 using ASTView and build I20051025-0800+v_619