Bug 310002

Summary: ToolFactory.createScanner(..) should use workspace compliance
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, daniel_megert, jarthana, markus.kell.r, srikanth_sankaran
Version: 3.6   
Target Milestone: 3.6 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Updated patch with javadoc changes none

Description Olivier Thomann CLA 2010-04-21 13:01:18 EDT
The createScanner(..) methods that don't take a compliance level should use the workspace compliance as this is useful to be able to read surrogates.
Surrogates are valid only in compliance >= 1.5.
Comment 1 Olivier Thomann CLA 2010-04-21 13:45:15 EDT
Created attachment 165609 [details]
Proposed fix

Under testing.
Comment 2 Markus Keller CLA 2010-04-21 13:50:34 EDT
Is the Unicode level the only change that's controlled with the compliance level? If not, this may surprise some existing clients.

I guess these methods also used to work without a workspace, so please make sure such scenarios are not broken.

The Javadoc should also tell about the new default (and the the paragraph about 'strictCommentMode' can be removed, since it's not implemented).
Comment 3 Olivier Thomann CLA 2010-04-21 14:03:15 EDT
(In reply to comment #2)
> Is the Unicode level the only change that's controlled with the compliance
> level? If not, this may surprise some existing clients.
yes. This is the only thing that the compliance checks.
 
> I guess these methods also used to work without a workspace, so please make
> sure such scenarios are not broken.
This doesn't change with the proposed patch.
 
> The Javadoc should also tell about the new default (and the the paragraph about
> 'strictCommentMode' can be removed, since it's not implemented).
I'll update the javadoc.
Comment 4 Olivier Thomann CLA 2010-04-21 14:12:26 EDT
Created attachment 165615 [details]
Updated patch with javadoc changes
Comment 5 Olivier Thomann CLA 2010-04-21 21:57:11 EDT
Released for 3.6M7.
Comment 6 Ayushman Jain CLA 2010-04-26 14:28:22 EDT
Verified for 3.6M7 though code inspection
Comment 7 Srikanth Sankaran CLA 2010-04-27 06:00:44 EDT
Verified.