Skip to content

Commit d03a4b0

Browse files
committed
Make null config reading safe
1 parent 86f65af commit d03a4b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grails-plugin-controllers/src/main/groovy/grails/artefact/controller/support/ResponseRenderer.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ trait ResponseRenderer extends WebAttributes {
150150
}
151151

152152
private void renderJsonInternal(HttpServletResponse response, Closure callable) {
153-
if( Holders.getConfig().getProperty(Settings.SETTING_LEGACY_JSON_BUILDER, Boolean.class, false) ) {
153+
if( Holders.getConfig()?.getProperty(Settings.SETTING_LEGACY_JSON_BUILDER, Boolean.class, false) ) {
154154
def builder = new JSONBuilder()
155155
JSON json = builder.build(callable)
156156
json.render response

0 commit comments

Comments
 (0)