Bug 125360

Summary: IJavaProject#setOption() doesn't work if same option as default
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jerome Lanneluc CLA 2006-01-26 12:48:46 EST
I20060125

If the default value for JavaCore.COMPILER_SOURCE is JavaCore.VERSION_1_3, the following fails:

IJavaProject project = ...
project.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
project.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3);
String option = project.getOption(JavaCore.COMPILER_SOURCE, true);
assertEquals(JavaCore.VERSION_1_3, option);
Comment 1 Frederic Fusier CLA 2006-01-31 05:03:21 EST
Fixed and released in HEAD.

Problem came from JavaProject.setOption(String,String) which didn't remove option from project preference when value was equals to default one...

Test case added in OptionTests
Comment 2 David Audel CLA 2006-02-15 05:11:02 EST
Verified for 3.2 M5 using build I20060215-0010