File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
grails-plugin-controllers/src/main/groovy/org/codehaus/groovy/grails/plugins/web/api Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,9 @@ public static void initialize(Object instance) {
116116 if (Environment .getCurrent () == Environment .TEST ) {
117117 GrailsWebRequest webRequest = GrailsWebRequest .lookup ();
118118 if (webRequest != null ) {
119- webRequest .setControllerName (GrailsNameUtils .getLogicalPropertyName (
120- instance .getClass ().getName (), ControllerArtefactHandler .TYPE ));
119+ // GRAILS-10929 - If the class name ends with $$..., then it's a proxy and we want to remove that from the name
120+ String className = instance .getClass ().getName ().replaceAll ("\\ $\\ $.*$" , "" );
121+ webRequest .setControllerName (GrailsNameUtils .getLogicalPropertyName (className , ControllerArtefactHandler .TYPE ));
121122 }
122123 }
123124 }
You can’t perform that action at this time.
0 commit comments