Copilot commented on code in PR #432:
URL: https://github.com/apache/commons-beanutils/pull/432#discussion_r3695533184


##########
src/main/java/org/apache/commons/beanutils2/expression/DefaultResolver.java:
##########
@@ -84,6 +84,9 @@ public int getIndex(final String expression) {
                 } catch (final Exception e) {

Review Comment:
   `Integer.parseInt` only throws `NumberFormatException` here; catching 
`Exception` is overly broad and can mask unrelated runtime problems under an 
"Invalid index value" message. Narrow the catch to `NumberFormatException`.



-- 
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