Skip to content

Commit

Permalink
Merge pull request #135 from codeconsole/6.0.x-annotation-not-present
Browse files Browse the repository at this point in the history
Support if annotation is not present
  • Loading branch information
codeconsole authored Sep 27, 2024
2 parents 8818fc4 + e82c30e commit ced29c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ScaffoldingControllerInjector implements GrailsArtefactClassInjector {
}
}
classNode.setSuperClass(GrailsASTUtils.nonGeneric(superClassNode, domainClass))
def readOnlyExpression = (ConstantExpression) annotationNode.getMember("readOnly")
def readOnlyExpression = (ConstantExpression) annotationNode?.getMember("readOnly")
new ResourceTransform().addConstructor(classNode, domainClass, readOnlyExpression?.getValue()?.asBoolean()?:false)
} else if (!currentSuperClass.isDerivedFrom(superClassNode)) {
GrailsASTUtils.error(source, classNode, "Scaffolded controllers (${classNode.name}) cannot extend other classes: ${currentSuperClass.getName()}", true)
Expand Down

0 comments on commit ced29c5

Please sign in to comment.