From d20d8e7d310f3678d92b10977af0ae4a8a460a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20Br=C3=BCnings?= Date: Wed, 4 Oct 2017 21:09:06 +0200 Subject: [PATCH] Remove invalid and dead branch --- .../org/spockframework/runtime/BaseSpecRunner.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/spock-core/src/main/java/org/spockframework/runtime/BaseSpecRunner.java b/spock-core/src/main/java/org/spockframework/runtime/BaseSpecRunner.java index eeb9eaea85..bd70705607 100755 --- a/spock-core/src/main/java/org/spockframework/runtime/BaseSpecRunner.java +++ b/spock-core/src/main/java/org/spockframework/runtime/BaseSpecRunner.java @@ -402,13 +402,10 @@ public void doRunSetup(SpecInfo spec) { private void runFeatureMethod() { if (runStatus != OK) return; - if ((currentIteration == null)) { - invoke(currentInstance, currentFeature.getFeatureMethod(), currentIteration.getDataValues()); - } else { - MethodInfo featureIteration = new MethodInfo(currentFeature.getFeatureMethod()); - featureIteration.setIteration(currentIteration); - invoke(currentInstance, featureIteration, currentIteration.getDataValues()); - } + + MethodInfo featureIteration = new MethodInfo(currentFeature.getFeatureMethod()); + featureIteration.setIteration(currentIteration); + invoke(currentInstance, featureIteration, currentIteration.getDataValues()); } private void runCleanup() {