Details
Description
ClassNode:306 has
if ((modifiers & ACC_INTERFACE) == 0) addField("$ownClass", ACC_STATIC|ACC_PUBLIC|ACC_FINAL, ClassHelper.CLASS_Type, new ClassExpression(this)).setSynthetic(true); transformInstances = new EnumMap<CompilePhase, Map<Class <? extends ASTTransformation>, Set<ASTNode>>>(CompilePhase.class); for (CompilePhase phase : CompilePhase.values()) { transformInstances.put(phase, new HashMap<Class <? extends ASTTransformation>, Set<ASTNode>>()); }
which should be moved somewhere else. The "$ownclass" probably into verifier (see GROOVY-3255) and the for transformInstances we need to find a good place. At last there is no sense in addeding these instances to a ClassNode, that is no primary class node. The code above is for example executed for each class creation in ClassHelper, which looks very surplus
Activity
Paul King
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
ClassNode:306 has {code:Java} if ((modifiers & ACC_INTERFACE) == 0) addField("$ownClass", ACC_STATIC|ACC_PUBLIC|ACC_FINAL, ClassHelper.CLASS_Type, new ClassExpression(this)).setSynthetic(true); transformInstances = new EnumMap<CompilePhase, Map<Class <? extends ASTTransformation>, Set<ASTNode>>>(CompilePhase.class); for (CompilePhase phase : CompilePhase.values()) { transformInstances.put(phase, new HashMap<Class <? extends ASTTransformation>, Set<ASTNode>>()); }{code} which should be moved somewhere else. The "$ownclass" probably into verifier and the for transformInstances we need to find a good place. At last there is no sense in addeding these instances to a ClassNode, that is no primary class node. The code above is for example executed for each class creation in ClassHelper, which looks very surplus |
ClassNode:306 has {code:Java} if ((modifiers & ACC_INTERFACE) == 0) addField("$ownClass", ACC_STATIC|ACC_PUBLIC|ACC_FINAL, ClassHelper.CLASS_Type, new ClassExpression(this)).setSynthetic(true); transformInstances = new EnumMap<CompilePhase, Map<Class <? extends ASTTransformation>, Set<ASTNode>>>(CompilePhase.class); for (CompilePhase phase : CompilePhase.values()) { transformInstances.put(phase, new HashMap<Class <? extends ASTTransformation>, Set<ASTNode>>()); }{code} which should be moved somewhere else. -The "$ownclass" probably into verifier- (see |
Guillaume Laforge
made changes -
| Fix Version/s | 1.7-beta-x [ 15538 ] | |
| Fix Version/s | 1.7-beta-1 [ 14014 ] |
blackdrag blackdrag
made changes -
| Fix Version/s | 1.8.x [ 15750 ] | |
| Fix Version/s | 2.x [ 17013 ] | |
| Fix Version/s | 1.7.x [ 15538 ] |
Paul King
made changes -
| Assignee | Paul King [ paulk_asert ] |
I cloned
GROOVY-3255since the issue with the transform code is still there