Bug 310002 - ToolFactory.createScanner(..) should use workspace compliance
Summary: ToolFactory.createScanner(..) should use workspace compliance
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-21 13:01 EDT by Olivier Thomann CLA
Modified: 2010-04-27 06:00 EDT (History)
5 users (show)

See Also:


Attachments
Proposed fix (3.65 KB, patch)
2010-04-21 13:45 EDT, Olivier Thomann CLA
no flags Details | Diff
Updated patch with javadoc changes (9.69 KB, patch)
2010-04-21 14:12 EDT, Olivier Thomann CLA
no flags Details | Diff

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