You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2021/12/23 10:03:46 UTC
[commons-jcs] 01/04: Fix unchecked warning
This is an automated email from the ASF dual-hosted git repository.
tv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git
commit c6297c527e1e63ce88314993364852d4ca2ecadb
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Thu Dec 23 10:54:11 2021 +0100
Fix unchecked warning
---
.../java/org/apache/commons/jcs3/utils/config/PropertySetter.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/config/PropertySetter.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/config/PropertySetter.java
index 6f723d0..a06578e 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/config/PropertySetter.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/config/PropertySetter.java
@@ -260,7 +260,8 @@ public class PropertySetter
}
else if( type.isEnum() )
{
- return Enum.valueOf(type.asSubclass(Enum.class), v );
+ Enum<?> valueOf = Enum.valueOf(type.asSubclass(Enum.class), v);
+ return valueOf;
}
else if ( File.class.isAssignableFrom( type ) )
{
@@ -281,7 +282,8 @@ public class PropertySetter
introspect();
}
- for (final PropertyDescriptor prop : props) {
+ for (final PropertyDescriptor prop : props)
+ {
if ( name.equals( prop.getName() ) )
{
return prop;