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 2024/09/03 12:01:44 UTC
(commons-beanutils) 04/07: Inline single use variable
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-beanutils.git
commit eeeb43feaebaea9a42bf3da84747b53ca2a4af4e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Sep 3 07:56:54 2024 -0400
Inline single use variable
---
src/main/java/org/apache/commons/beanutils2/ConstructorUtils.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/beanutils2/ConstructorUtils.java b/src/main/java/org/apache/commons/beanutils2/ConstructorUtils.java
index aea1cd1d..78ea73df 100644
--- a/src/main/java/org/apache/commons/beanutils2/ConstructorUtils.java
+++ b/src/main/java/org/apache/commons/beanutils2/ConstructorUtils.java
@@ -185,12 +185,9 @@ public class ConstructorUtils {
* TODO: Why?
*/
}
- @SuppressWarnings("unchecked")
- final
// Class.getConstructors() actually returns constructors
// of type T, so it is safe to cast.
- Constructor<T> typedCtor = (Constructor<T>) ctor;
- return typedCtor;
+ return (Constructor<T>) ctor;
}
}
}