From 8a231f66471e8894907b57845d4ee5f4273a72f3 Mon Sep 17 00:00:00 2001 From: Michael Seele Date: Thu, 17 Oct 2019 08:10:06 +0200 Subject: [PATCH] remove typo and duplicate code This closes #102 pull request at github/apache/ant --- .../optional/junitlauncher/StandaloneLauncher.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java index d6b61ae19..3f9d99fa5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java @@ -140,9 +140,9 @@ public class StandaloneLauncher { reader.require(START_DOCUMENT, null, null); reader.nextTag(); reader.require(START_ELEMENT, null, LD_XML_ELM_LAUNCH_DEF); - final String haltOnfFailure = reader.getAttributeValue(null, LD_XML_ATTR_HALT_ON_FAILURE); - if (haltOnfFailure != null) { - forkedLaunch.setHaltOnFailure(Boolean.parseBoolean(haltOnfFailure)); + final String haltOnFailure = reader.getAttributeValue(null, LD_XML_ATTR_HALT_ON_FAILURE); + if (haltOnFailure != null) { + forkedLaunch.setHaltOnFailure(Boolean.parseBoolean(haltOnFailure)); } final String includeTags = reader.getAttributeValue(null, LD_XML_ATTR_INCLUDE_TAGS); if (includeTags != null) { @@ -156,9 +156,6 @@ public class StandaloneLauncher { if (printSummary != null) { forkedLaunch.setPrintSummary(Boolean.parseBoolean(printSummary)); } - if (haltOnfFailure != null) { - forkedLaunch.setHaltOnFailure(Boolean.parseBoolean(haltOnfFailure)); - } reader.nextTag(); reader.require(START_ELEMENT, null, null); final String elementName = reader.getLocalName();