From 48483f3713a2f47224e83f9d5f6024a2207f4a38 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Thu, 21 Sep 2006 19:26:45 +0000 Subject: [PATCH] a little cleanup git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@448642 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/IntrospectionHelper.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/org/apache/tools/ant/IntrospectionHelper.java b/src/main/org/apache/tools/ant/IntrospectionHelper.java index abdef1cdd..d426f6ac6 100644 --- a/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -1270,9 +1270,7 @@ public final class IntrospectionHelper implements BuildListener { Object create(Project project, Object parent, Object child) throws InvocationTargetException, IllegalAccessException, InstantiationException { - if (child != null) { - // Empty - } else { + if (child == null) { child = constructor.newInstance( (constructor.getParameterTypes().length == 0) ? new Object[] {} : new Object[] {project}); @@ -1416,7 +1414,7 @@ public final class IntrospectionHelper implements BuildListener { Object create(Project project, Object parent, Object ignore) throws InvocationTargetException, IllegalAccessException { if (!method.getName().endsWith("Configured")) { - method.invoke(parent, new Object[]{realObject}); + method.invoke(parent, new Object[] {realObject}); } return nestedObject; } @@ -1429,7 +1427,7 @@ public final class IntrospectionHelper implements BuildListener { throws InvocationTargetException, IllegalAccessException, InstantiationException { if (method.getName().endsWith("Configured")) { - method.invoke(parent, new Object[]{realObject}); + method.invoke(parent, new Object[] {realObject}); } } };