| Summary: | JavaCore.getDefaultOptions returns incorrect compiler compliance level | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Kathy Chan <kathy> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | szhou |
| Version: | 3.2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 171465 *** Closing defect. Not sure why multiple defects were opened. |
Driver: Eclipse 3.2.1 If I start the workbench with JDK 1.5 and create a Java project, the default JDK compliance level as shown by the UI is 1.5. When I run the code snippet: IJavaProject javaProject; projectJdkComplianceLevel = javaProject.getOption ("org.eclipse.jdt.core.compiler.compliance", false); defaultJdkComplianceLevel = (String)JavaCore.getDefaultOptions().get("org.eclipse.jdt.core.compiler.compliance"); Here's what I got: projectJdkcomplianceLevel = null (as expected since it's not set for project) defaultJdkComplianceLevel = 1.4 (expected 1.5) If I "enable project specific setting" and explicitely set compliance level to Java 5.0, projectJdkcomplianceLevel = 1.5 (as expected) defaultJdkComplianceLevel = 1.4 (expected 1.5) If I run the workbench with JDK 1.4, defaultJdkcomplianceLevel is 1.4 as expected. Would it be possible to have this problem addressed for Eclipse 3.2.2?