Summary: | JavaCore.getDefaultOptions returns incorrect compiler compliance level | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kathy Chan <kathy> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | CLOSED INVALID | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | eric_jodet, szhou |
Version: | 3.2.1 | ||
Target Milestone: | 3.2.2 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Kathy Chan
2007-01-23 16:45:49 EST
*** Bug 162326 has been marked as a duplicate of this bug. *** *** Bug 171467 has been marked as a duplicate of this bug. *** *** Bug 171466 has been marked as a duplicate of this bug. *** The default should always be 1.4. Why don't you call this line instead: defaultJdkComplianceLevel = (String)JavaCore.getOptions().get("org.eclipse.jdt.core.compiler.compliance"); ? JavaCore.getDefaultOptions() should be used to know what are the default options of JavaCore. JavaCore.getOptions() reflects the current workspace options. Could you please use JavaCore.getOptions() and tell me if this is fixing your issue? Thanks. I confirm that JavaCore.getOptions() returns the correct value (ie. 1.5). So, using this method instead getDefaultOptions() will solve the initial problem. So, close as INVALID (getDefaultOptions() returns a correct value) and reopen original bug to change the code to call the right method or continue the investigation... Yes. That fixes the problem. Thanks for pointing out the correct API to use. |