You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2022/06/25 12:00:18 UTC
[groovy] branch master updated: Trivial refactoring: remove redundant type casting
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new cd7d21e994 Trivial refactoring: remove redundant type casting
cd7d21e994 is described below
commit cd7d21e994d0355aaa3058498849c80397c4aff6
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Jun 25 19:59:55 2022 +0800
Trivial refactoring: remove redundant type casting
---
src/main/java/org/codehaus/groovy/reflection/MixinInMetaClass.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/reflection/MixinInMetaClass.java b/src/main/java/org/codehaus/groovy/reflection/MixinInMetaClass.java
index 93c075c56d..308bbb0463 100644
--- a/src/main/java/org/codehaus/groovy/reflection/MixinInMetaClass.java
+++ b/src/main/java/org/codehaus/groovy/reflection/MixinInMetaClass.java
@@ -110,7 +110,7 @@ public class MixinInMetaClass {
ExpandoMetaClass mc = (ExpandoMetaClass) self;
- List<MetaMethod> arr = new ArrayList<MetaMethod>();
+ List<MetaMethod> arr = new ArrayList<>();
for (Class categoryClass : categoryClasses) {
final CachedClass cachedCategoryClass = ReflectionCache.getCachedClass(categoryClass);
@@ -152,8 +152,8 @@ public class MixinInMetaClass {
}
}
- for (Object res : arr) {
- final MetaMethod metaMethod = (MetaMethod) res;
+ for (MetaMethod res : arr) {
+ final MetaMethod metaMethod = res;
if (metaMethod.getDeclaringClass().isAssignableFrom(selfClass))
mc.registerInstanceMethod(metaMethod);
else {