Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 1.8-beta-1
-
Fix Version/s: None
-
Component/s: class generator
-
Labels:None
-
Number of attachments :
Description
Currently there is no relation between the very interdependent properties - synthetic of AnnotatedNode and modifiers of various sub-classes like MethodNode, FieldNode, etc - which means that if the developer remembers to call one but forgets another, it leaves the AST in an inconsistent state. It can have synthetic == true but modifiers with SYNTHETIC bit off and vice versa.
This leads to issues at various places currently because fields, methods, classes that were intended to be synthetic don't necessarily get marked so in the bytecode.
For the nodes that have modifiers, isSynthetic()/setSynthetic()/setModifiers() should all be in sync - only based on modifiers value behind the scenes.