Community
Participate
Working Groups
Build Identifier: M20110210-1200 ASTParser.setEnvironment() has a includeRunningVMBootclasspath parameter so the running VM's bootclasspath isn't used when parsing. However, this parameter isn't referenced, and instead this always runs: this.bits |= CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH; Suggested patch: if (includeRunningVMBootclasspath) { this.bits |= CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH; } Reproducible: Always Steps to Reproduce: Open org.eclipse.jdt.core.dom.ASTParser, and code-review its setEnvironment method.
Srikanth, this looks too late for RC4. Targeting 3.7.1 ?
Created attachment 196804 [details] Proposed fix
(In reply to comment #2) > Created attachment 196804 [details] > Proposed fix Wow, that was fast triage! Thanks. FWIW, I have an ugly workaround, so there's no rush: Field field = parser.getClass().getDeclaredField("bits"); field.setAccessible(true); int bits = field.getInt(parser); // Turn off CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH bits &= ~0x20; field.setInt(parser, bits);
> FWIW, I have an ugly workaround, so there's no rush: > > Field field = parser.getClass().getDeclaredField("bits"); > field.setAccessible(true); > int bits = field.getInt(parser); > // Turn off CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH > bits &= ~0x20; > field.setInt(parser, bits); This is exactly why I'd like to get it fixed asap :-). Fix is trivial and there is no risk, but the rules are pretty strict at this point. Daniel, what is your take on this one ?
(In reply to comment #4) > > FWIW, I have an ugly workaround, so there's no rush: > > > > Field field = parser.getClass().getDeclaredField("bits"); > > field.setAccessible(true); > > int bits = field.getInt(parser); > > // Turn off CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH > > bits &= ~0x20; > > field.setInt(parser, bits); > This is exactly why I'd like to get it fixed asap :-). > Fix is trivial and there is no risk, but the rules are pretty strict at this > point. > Daniel, what is your take on this one ? Is it a regression compared to 3.6? If not -> 3.7.1.
Released in BETA_JAVA7 branch. Since this branch will be our 3.7.1 contents, this is fine.
Verified. The fix in the BETA_JAVA7 brach is simple and correct.