Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ public static void initialize(Object instance) {
if (Environment.getCurrent() == Environment.TEST) {
GrailsWebRequest webRequest = GrailsWebRequest.lookup();
if (webRequest != null) {
webRequest.setControllerName(GrailsNameUtils.getLogicalPropertyName(
instance.getClass().getName(), ControllerArtefactHandler.TYPE));
// GRAILS-10929 - If the class name ends with $$..., then it's a proxy and we want to remove that from the name
String className = instance.getClass().getName().replaceAll("\\$\\$.*$", "");
webRequest.setControllerName(GrailsNameUtils.getLogicalPropertyName(className, ControllerArtefactHandler.TYPE));
}
}
}
Expand Down