This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY-9631
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY-9631 by this push:
new 1c62975 Trivial refactoring: Casting 'propertyIndex.get(...)' to
'MetaProperty' is redundant
1c62975 is described below
commit 1c6297546e89f418935b75a54017010d09c8e7ef
Author: Daniel Sun <[email protected]>
AuthorDate: Sun Jul 12 08:55:47 2020 +0800
Trivial refactoring: Casting 'propertyIndex.get(...)' to 'MetaProperty' is
redundant
---
src/main/java/groovy/lang/MetaClassImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java
b/src/main/java/groovy/lang/MetaClassImpl.java
index 06fa470..641d31c 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -2599,7 +2599,7 @@ public class MetaClassImpl implements MetaClass,
MutableMetaClass {
private static void createMetaBeanProperty(IndexMap<String, MetaProperty>
propertyIndex, String propName, boolean isGetter, MetaMethod propertyMethod) {
// is this property already accounted for?
- MetaProperty mp = (MetaProperty) propertyIndex.get(propName);
+ MetaProperty mp = propertyIndex.get(propName);
MetaProperty newMp = makeReplacementMetaProperty(mp, propName,
isGetter, propertyMethod);
if (newMp != mp) {
propertyIndex.put(propName, newMp);