Community
Participate
Working Groups
In researching my own misuse of Boolean.getBoolean() I found the following use in JDT core's Member#getHandleFromMemento if (!memento.hasMoreTokens()) return this; boolean isParameter = Boolean.getBoolean(memento.nextToken()); getBoolean looks up system properties and converts the value to a boolean. I did not do any code review but from a distance it seems unlikely that that is what you want here. Rather, consider boolean isParameter = Boolean.valueOf(memento.nextToken().booleanValue);
Thanks, Jeff. This is indeed a bug. I guess you meant: boolean isParameter = Boolean.valueOf(memento.nextToken()).booleanValue(); I'll provide a patch shortly.
Created attachment 183598 [details] Proposed fix + regression test Changing the MementoTests to check that the memento of the restored java element is equals to the expected memento. I think this also exposed a bug in org.eclipse.jdt.internal.core.JavaProject.getPackageFragmentRoot(IPath). See attached patch.
Jay, please review the patch. I have not yet run all tests with this patch. But MementoTests are now green.
All model tests passed.
Patch looks good.
Released for 3.7M4.
Verified for 3.7M4 by code inspection and regression tests.