ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [06/11] ant git commit: could have used isAssignableFrom since Ant 1.9.0
Date Wed, 21 Dec 2016 15:58:02 GMT
could have used isAssignableFrom since Ant 1.9.0


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/9d118612
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/9d118612
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/9d118612

Branch: refs/heads/1.9.x
Commit: 9d118612833b8dddb6293debeb8e82ab5c256b9f
Parents: 3e235a8
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Wed Dec 21 15:45:06 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Wed Dec 21 16:00:42 2016 +0100

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/taskdefs/AntStructure.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/9d118612/src/main/org/apache/tools/ant/taskdefs/AntStructure.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/AntStructure.java b/src/main/org/apache/tools/ant/taskdefs/AntStructure.java
index 707f4b9..8554a2a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/AntStructure.java
+++ b/src/main/org/apache/tools/ant/taskdefs/AntStructure.java
@@ -390,8 +390,7 @@ public class AntStructure extends Task {
                     } catch (final IllegalAccessException ie) {
                         sb.append("CDATA ");
                     }
-                } else if (type.getSuperclass() != null
-                           && type.getSuperclass().getName().equals("java.lang.Enum"))
{
+                } else if (Enum.class.isAssignableFrom(type)) {
                     try {
                         final Object[] values = (Object[]) type.getMethod("values", (Class[])
 null)
                             .invoke(null, (Object[]) null);


Mime
View raw message