You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/06/16 20:06:55 UTC
[commons-configuration] 01/03: Throwing Exception is an anti-pattern, so be more precise since we easily can
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
commit 6c44922ea7967f573e06956688da49377c8fb045
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jun 16 15:55:59 2022 -0400
Throwing Exception is an anti-pattern, so be more precise since we
easily can
---
.../configuration2/builder/BuilderConfigurationWrapperFactory.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java b/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java
index d0483070..1f8cd9ff 100644
--- a/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java
+++ b/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java
@@ -237,9 +237,9 @@ public class BuilderConfigurationWrapperFactory {
* @param method the method to be invoked
* @param args method arguments
* @return the return value of the method
- * @throws Exception if an error occurs
+ * @throws ReflectiveOperationException if an error occurs
*/
- private Object handleEventSourceInvocation(final Method method, final Object... args) throws Exception {
+ private Object handleEventSourceInvocation(final Method method, final Object... args) throws ReflectiveOperationException {
final Object target = EventSourceSupport.DUMMY == eventSourceSupport ? ConfigurationUtils.asEventSource(this, true) : builder;
return method.invoke(target, args);
}