Community
Participate
Working Groups
Running org.eclipse.jdt.core.tests.model.TypeResolveTests#testResolveTypeInBinary1 in the debugger I see funny modifiers. Set a breakpoint in SelectionEngine#selectType and look at typeDeclaration: public synchronized class Y ... This is produced by the BinaryTypeConverter indirectly using ClassFileReader#getModifiers() which fails to filter AccSuper from the bits set in the class file (Synchronized and Super share the same bit). When this type is passed to buildTypeBindings the compiler detects: "Pb(302) Illegal modifier for the class Y; only public, abstract & final are permitted" Certainly this error never surfaces, but I see no good in converting to buggy code (BinaryTypeConverter). Would we ever want to see the AccSuper bit through a ClassFileReader? Or should it be filter right away when initializing the reader? While I'm at it: mentioned method getModifiers() has a doc comment reading: * Set the AccDeprecated and AccSynthetic bits if necessary however, the code only handles AccDeprecated. So far nothing any user will notice but behind the scenes it looks wrong ...
Created attachment 142724 [details] Proposed fix
Released for 3.6M1. Source verification is required.
Verified for 3.6M1 by code inspection