Repository: ant Updated Branches: refs/heads/master 5d8bc76b1 -> 58e7645a9
Useless casts Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/58e7645a Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/58e7645a Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/58e7645a Branch: refs/heads/master Commit: 58e7645a97beebf509223acb9166e3cc6f9ec456 Parents: 5d8bc76 Author: Gintas Grigelionis <[email protected]> Authored: Sat Jul 28 15:06:05 2018 +0200 Committer: Gintas Grigelionis <[email protected]> Committed: Sat Jul 28 15:06:05 2018 +0200 ---------------------------------------------------------------------- src/main/org/apache/tools/ant/IntrospectionHelper.java | 8 ++++---- .../org/apache/tools/ant/types/selectors/SelectSelector.java | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/58e7645a/src/main/org/apache/tools/ant/IntrospectionHelper.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/IntrospectionHelper.java b/src/main/org/apache/tools/ant/IntrospectionHelper.java index 8a5d0fa..15307c8 100644 --- a/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -875,13 +875,13 @@ public final class IntrospectionHelper { * @since Ant 1.6.3 */ public Method getElementMethod(final String elementName) throws BuildException { - final Object creator = nestedCreators.get(elementName); + final NestedCreator creator = nestedCreators.get(elementName); if (creator == null) { throw new UnsupportedElementException("Class " + bean.getName() + " doesn't support the nested \"" + elementName + "\" element.", elementName); } - return ((NestedCreator) creator).method; + return creator.method; } /** @@ -896,13 +896,13 @@ public final class IntrospectionHelper { * @since Ant 1.6.3 */ public Method getAttributeMethod(final String attributeName) throws BuildException { - final Object setter = attributeSetters.get(attributeName); + final AttributeSetter setter = attributeSetters.get(attributeName); if (setter == null) { throw new UnsupportedAttributeException("Class " + bean.getName() + " doesn't support the \"" + attributeName + "\" attribute.", attributeName); } - return ((AttributeSetter) setter).method; + return setter.method; } /** http://git-wip-us.apache.org/repos/asf/ant/blob/58e7645a/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java b/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java index d091db0..82afd06 100644 --- a/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java +++ b/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java @@ -66,8 +66,7 @@ public class SelectSelector extends BaseSelectorContainer { * referenced Selector. */ private SelectSelector getRef() { - Object o = getCheckedRef(this.getClass(), "SelectSelector"); - return (SelectSelector) o; + return getCheckedRef(this.getClass(), "SelectSelector"); } /**
