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 2025/03/20 15:27:33 UTC
(commons-jxpath) 02/11: JXPathBasicBeanInfo.propertyDescriptorMap now uses generics
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-jxpath.git
commit 81566202d57b8bbdbae5ddac11fe5e4c0dd70630
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Thu Mar 20 10:35:48 2025 -0400
JXPathBasicBeanInfo.propertyDescriptorMap now uses generics
---
src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java b/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
index c1b58e5..0a18dcc 100644
--- a/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
+++ b/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
@@ -61,7 +61,7 @@ public class JXPathBasicBeanInfo implements JXPathBeanInfo {
/**
* PropertyDescriptor for the specified name or null if there is no such property.
*/
- private transient HashMap propertyDescriptorMap;
+ private transient HashMap<String, PropertyDescriptor> propertyDescriptorMap;
/**
* Constructs a new JXPathBasicBeanInfo.
@@ -108,13 +108,13 @@ public class JXPathBasicBeanInfo implements JXPathBeanInfo {
@Override
public synchronized PropertyDescriptor getPropertyDescriptor(final String propertyName) {
if (propertyDescriptorMap == null) {
- propertyDescriptorMap = new HashMap();
+ propertyDescriptorMap = new HashMap<>();
final PropertyDescriptor[] pds = getPropertyDescriptors();
for (final PropertyDescriptor pd : pds) {
propertyDescriptorMap.put(pd.getName(), pd);
}
}
- return (PropertyDescriptor) propertyDescriptorMap.get(propertyName);
+ return propertyDescriptorMap.get(propertyName);
}
@Override