Skip to content

Commit 03ff4cf

Browse files
committed
fix failing test
1 parent cc6fbc3 commit 03ff4cf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@ public String getLogicalControllerName(GroovyObject controller) {
8080
return webRequest != null ? webRequest.getControllerName() : null;
8181
}
8282
else {
83-
if(!controller.getClass().getSimpleName().endsWith(ControllerArtefactHandler.TYPE)) {
83+
String simpleName = controller.getClass().getSimpleName();
84+
if(!simpleName.endsWith(ControllerArtefactHandler.TYPE)) {
8485
GrailsWebRequest webRequest = GrailsWebRequest.lookup();
8586
return webRequest != null ? webRequest.getControllerName() : null;
8687
}
8788
else {
88-
return GrailsNameUtils.getLogicalPropertyName(controller.getClass().getSimpleName(), ControllerArtefactHandler.TYPE);
89+
return GrailsNameUtils.getLogicalPropertyName(simpleName, ControllerArtefactHandler.TYPE);
8990
}
9091
}
9192
}

0 commit comments

Comments
 (0)