This is an automated email from the ASF dual-hosted git repository.

borinquenkid pushed a commit to branch 9.0.x-h7-improvement-phase3
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 97c13e0fcc5d3223bc07edace838adefa145ec44
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Wed Oct 7 18:02:47 2026 -0500

    style: name intentionally empty catch parameters ignored in grails-shell-cli
    
    CodeNarc EmptyCatchBlock only accepts an empty catch block whose parameter 
is
    named ignored. Pure parameter renames, no behaviour change.
    
    Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
 .../cli/boot/GrailsApplicationCompilerAutoConfiguration.groovy      | 2 +-
 .../org/grails/cli/command/run/SpringApplicationRunner.groovy       | 6 +++---
 .../main/groovy/org/grails/cli/compiler/DependencyCustomizer.groovy | 6 +++---
 .../groovy/org/grails/cli/compiler/ExtendedGroovyClassLoader.groovy | 2 +-
 .../src/main/groovy/org/grails/cli/util/ResourceUtils.groovy        | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/grails-shell-cli/src/main/groovy/org/grails/cli/boot/GrailsApplicationCompilerAutoConfiguration.groovy
 
b/grails-shell-cli/src/main/groovy/org/grails/cli/boot/GrailsApplicationCompilerAutoConfiguration.groovy
index fcc75ac85a..e66845b8fd 100644
--- 
a/grails-shell-cli/src/main/groovy/org/grails/cli/boot/GrailsApplicationCompilerAutoConfiguration.groovy
+++ 
b/grails-shell-cli/src/main/groovy/org/grails/cli/boot/GrailsApplicationCompilerAutoConfiguration.groovy
@@ -124,7 +124,7 @@ class GrailsApplicationCompilerAutoConfiguration extends 
CompilerAutoConfigurati
         AnnotationNode enableAutoAnnotation = new 
AnnotationNode(ENABLE_AUTO_CONFIGURATION_CLASS_NODE)
         try {
             enableAutoAnnotation.addMember('exclude', new 
ClassExpression(ClassHelper.make('org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration')))
-        } catch (Throwable e) {
+        } catch (Throwable ignored) {
             // ignore
         }
         applicationClassNode.addAnnotation(enableAutoAnnotation)
diff --git 
a/grails-shell-cli/src/main/groovy/org/grails/cli/command/run/SpringApplicationRunner.groovy
 
b/grails-shell-cli/src/main/groovy/org/grails/cli/command/run/SpringApplicationRunner.groovy
index a81f087cf4..13e5b04b1d 100644
--- 
a/grails-shell-cli/src/main/groovy/org/grails/cli/command/run/SpringApplicationRunner.groovy
+++ 
b/grails-shell-cli/src/main/groovy/org/grails/cli/command/run/SpringApplicationRunner.groovy
@@ -186,7 +186,7 @@ class SpringApplicationRunner {
                         Method method = 
this.applicationContext.getClass().getMethod('close')
                         method.invoke(this.applicationContext)
                     }
-                    catch (NoSuchMethodException ex) {
+                    catch (NoSuchMethodException ignored) {
                         // Not an application context that we can close
                     }
                     catch (Exception ex) {
@@ -250,7 +250,7 @@ class SpringApplicationRunner {
                             sources.add(new File(url.getFile()))
                         }
                     }
-                    catch (MalformedURLException ex) {
+                    catch (MalformedURLException ignored) {
                         // Ignore
                     }
                 }
@@ -276,7 +276,7 @@ class SpringApplicationRunner {
                 catch (InterruptedException ex) {
                     Thread.currentThread().interrupt()
                 }
-                catch (Exception ex) {
+                catch (Exception ignored) {
                     // Swallow, will be reported by compileAndRun
                 }
             }
diff --git 
a/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/DependencyCustomizer.groovy
 
b/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/DependencyCustomizer.groovy
index b5ef710d4c..deb457dce7 100644
--- 
a/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/DependencyCustomizer.groovy
+++ 
b/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/DependencyCustomizer.groovy
@@ -121,7 +121,7 @@ class DependencyCustomizer {
                         Class.forName(className, false, 
DependencyCustomizer.this.loader)
                         return false
                     }
-                    catch (Exception ex) {
+                    catch (Exception ignored) {
                         // swallow exception and continue
                     }
                 }
@@ -146,7 +146,7 @@ class DependencyCustomizer {
                             return false
                         }
                     }
-                    catch (Exception ex) {
+                    catch (Exception ignored) {
                         // swallow exception and continue
                     }
                 }
@@ -169,7 +169,7 @@ class DependencyCustomizer {
                     try {
                         return 
DependencyCustomizer.this.loader.getResource(path) != null
                     }
-                    catch (Exception ex) {
+                    catch (Exception ignored) {
                         // swallow exception and continue
                     }
                 }
diff --git 
a/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/ExtendedGroovyClassLoader.groovy
 
b/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/ExtendedGroovyClassLoader.groovy
index 55bcd89b62..78680525c5 100644
--- 
a/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/ExtendedGroovyClassLoader.groovy
+++ 
b/grails-shell-cli/src/main/groovy/org/grails/cli/compiler/ExtendedGroovyClassLoader.groovy
@@ -205,7 +205,7 @@ class ExtendedGroovyClassLoader extends GroovyClassLoader {
                         try {
                             urls.add(file.toURI().toURL())
                         }
-                        catch (MalformedURLException ex) {
+                        catch (MalformedURLException ignored) {
                             // Swallow and continue
                         }
                     }
diff --git 
a/grails-shell-cli/src/main/groovy/org/grails/cli/util/ResourceUtils.groovy 
b/grails-shell-cli/src/main/groovy/org/grails/cli/util/ResourceUtils.groovy
index 642be42be6..9436c6afe1 100644
--- a/grails-shell-cli/src/main/groovy/org/grails/cli/util/ResourceUtils.groovy
+++ b/grails-shell-cli/src/main/groovy/org/grails/cli/util/ResourceUtils.groovy
@@ -83,7 +83,7 @@ abstract class ResourceUtils {
         try {
             result.addAll(getUrls(FILE_URL_PREFIX + path, classLoader))
         }
-        catch (IllegalArgumentException ex) {
+        catch (IllegalArgumentException ignored) {
             // ignore
         }
         path = stripLeadingSlashes(path)

Reply via email to