Community
Participate
Working Groups
Found that 'Inline finally blocks' option is enabled incorrectly: 1. In the compiler preference page, select 'Configure Project Specific Settings' and choose a Java 1.4 project. Select the 'Java Build Path' and modify the EE to J2SE-1.5. Use the back button or directly click on the Java Compiler to come back to the previous page where the project specific setting was being modified. See that the 'Inline finally blocks' is enabled for Java-1.5, which is wrong. 2. In the compiler preference page, select 1.4 compliance level. Now uncheck 'Inline finally blocks' option. Now change the compliance level to 1.5 and then change to 1.6 and now change it back to 1.4, the checkbox is now checked. This also looks wrong.
It can be reproduced and the exisiting behavior looks incorrect. Dani, please confirm if it should be fixed.
(In reply to Manju Mathew from comment #0) > Found that 'Inline finally blocks' option is enabled incorrectly: > 1. In the compiler preference page, select 'Configure Project Specific > Settings' and choose a Java 1.4 project. Select the 'Java Build Path' and > modify the EE to J2SE-1.5. Use the back button or directly click on the Java > Compiler to come back to the previous page where the project specific > setting was being modified. See that the 'Inline finally blocks' is enabled > for Java-1.5, which is wrong. Yes, the option/widget should be disabled in this case. There's no need to go via preference page, just edit the project settings is enough to surface the bug. > 2. In the compiler preference page, select 1.4 compliance level. Now uncheck > 'Inline finally blocks' option. Now change the compliance level to 1.5 and > then change to 1.6 and now change it back to 1.4, the checkbox is now > checked. This also looks wrong. Agreed. Please fix those issues.
Created attachment 235108 [details] Patch. The first issue occurred as #updateInlineJSREnableState() was not called after compliance setting was modified. The second issue was because the check box state is stored every time the check box is disabled. So when user change the compliance setting from 1.5 to 1.6, the state of the check box which was already in disabled state is disabled again and the disabled state value is stored. Dani, please have a look.
Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=f55c09735a2269acc67bed1a6b441138a4501794