From 4ec227cd6e318e6e854a2f49fccac13f4f462c62 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Tue, 17 Sep 2019 16:50:10 +0200 Subject: [PATCH] Revert 276acd1960b0e2578596a0d3507ad624ace9037c This commit reverts the change to `StepLocator` as it introduces an inconsistency with `JobLocator` (one returns null and the other throws an exception when no step/job is found with the given name). --- .../org/springframework/batch/core/step/StepLocator.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocator.java index 02ddc80cd..1c5aba4f2 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocator.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2018 the original author or authors. + * Copyright 2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,20 +18,17 @@ package org.springframework.batch.core.step; import java.util.Collection; import org.springframework.batch.core.Step; -import org.springframework.lang.Nullable; /** * Interface for locating a {@link Step} instance by name. * * @author Dave Syer - * @author Mahmoud Ben Hassine * */ public interface StepLocator { Collection getStepNames(); - - @Nullable - Step getStep(String stepName); + + Step getStep(String stepName) throws NoSuchStepException; }