Copilot commented on code in PR #15991:
URL: https://github.com/apache/grails-core/pull/15991#discussion_r3601747663


##########
grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateGormInstanceApi.groovy:
##########
@@ -337,7 +337,7 @@ abstract class AbstractHibernateGormInstanceApi<D> extends 
GormInstanceApi<D> {
                         }
                     }
                 }
-                catch (InvalidPropertyException ipe) {
+                catch (InvalidPropertyException ignored) {
                     // property is not accessable

Review Comment:
   Spelling in the comment: "accessable" → "accessible".



##########
grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/DefaultLinkGenerator.groovy:
##########
@@ -438,7 +438,9 @@ class DefaultLinkGenerator implements LinkGenerator, 
PluginManagerAware {
                     if (str) {
                         absolute = Boolean.parseBoolean(str)
                     }
-                } catch (e) {}
+                } catch (e) {
+                    log.debug('Unable to parse absolute link attribute', e)
+                }

Review Comment:
   The catch clause is untyped (`catch (e)`), which effectively catches very 
broadly and can hide serious errors. Since this block is only guarding 
`toString()`/`parseBoolean`, restrict the catch to `Exception` so `Error`s 
(e.g., OOME) are not swallowed.



##########
grails-shell-cli/src/main/groovy/org/grails/cli/profile/commands/CreateAppCommand.groovy:
##########
@@ -778,7 +778,7 @@ class CreateAppCommand extends ArgumentCompletingCommand 
implements ProfileRepos
     private void deleteDirectory(File directory) {
         try {
             directory?.deleteDir()
-        } catch (Throwable t) {
+        } catch (Throwable ignored) {
             // Ignore error deleting temporal directory

Review Comment:
   Spelling in the comment: "temporal directory" reads like a time-related 
directory; this appears to mean "temporary directory".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to