From 1ec738e0c2166588ef30230561c16d5487921b6c Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Thu, 21 Nov 2024 12:32:03 -0500 Subject: [PATCH 1/2] fix #13867 - remove resolution strategy assignment and use default --- .../main/groovy/org/grails/plugins/DefaultGrailsPlugin.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java b/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java index 0186ccf5df5..8fd135d1315 100644 --- a/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java +++ b/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java @@ -541,12 +541,10 @@ public void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig) BeanBuilder bb = new BeanBuilder(getParentCtx(),springConfig, grailsApplication.getClassLoader()); bb.setBinding(b); c.setDelegate(bb); - c.setResolveStrategy(Closure.OWNER_FIRST); bb.invokeMethod("beans", new Object[]{c}); } } else { - if (!pluginBean.isReadableProperty(DO_WITH_SPRING)) { return; } @@ -559,7 +557,6 @@ public void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig) BeanBuilder bb = new BeanBuilder(getParentCtx(),springConfig, grailsApplication.getClassLoader()); bb.setBinding(b); c.setDelegate(bb); - c.setResolveStrategy(Closure.DELEGATE_FIRST); bb.invokeMethod("beans", new Object[]{c}); } From 050166601df4f2ef3097fb7c51485ae8d2ba9212 Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Fri, 22 Nov 2024 07:43:21 -0500 Subject: [PATCH 2/2] feedback - formatting --- .../main/groovy/org/grails/plugins/DefaultGrailsPlugin.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java b/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java index 8fd135d1315..214e3e3f476 100644 --- a/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java +++ b/grails-core/src/main/groovy/org/grails/plugins/DefaultGrailsPlugin.java @@ -543,8 +543,7 @@ public void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig) c.setDelegate(bb); bb.invokeMethod("beans", new Object[]{c}); } - } - else { + } else { if (!pluginBean.isReadableProperty(DO_WITH_SPRING)) { return; }