From bc61ebf17a2d171d44f66e0a09f828ac3c1a6b38 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Thu, 16 Dec 2004 16:51:11 +0000 Subject: [PATCH] Same LOC count, minus 2 method calls, cute implementation. ;) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277225 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/ComponentHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/org/apache/tools/ant/ComponentHelper.java b/src/main/org/apache/tools/ant/ComponentHelper.java index 02477fe33..bd708a16c 100644 --- a/src/main/org/apache/tools/ant/ComponentHelper.java +++ b/src/main/org/apache/tools/ant/ComponentHelper.java @@ -585,9 +585,9 @@ public class ComponentHelper { */ private boolean sameDefinition( AntTypeDefinition def, AntTypeDefinition old) { - return ((validDefinition(def) && validDefinition(old) - && def.sameDefinition(old, project)) - || !(validDefinition(def) | validDefinition(old))); + boolean defValid = validDefinition(def); + boolean sameValidity = !(defValid | validDefinition(old)); + return sameValidity && (!defValid || def.sameDefinition(old, project)); } /**