BATCH-1183: Implement toString() on Step implementations
This commit is contained in:
@@ -19,6 +19,7 @@ package org.springframework.batch.core.configuration.xml;
|
||||
import org.springframework.batch.core.JobInterruptedException;
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Class used for delegating from a <step> definition to an individual bean
|
||||
@@ -61,4 +62,7 @@ public class DelegatingStep implements Step {
|
||||
return delegate.isAllowStartIfComplete();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ClassUtils.getShortName(getClass()) + ": [name=" + name + "]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.batch.repeat.RepeatException;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* A {@link Step} implementation that provides common behavior to subclasses,
|
||||
@@ -318,6 +319,10 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
|
||||
return jobRepository;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ClassUtils.getShortName(getClass()) + ": [name=" + name + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
* Default mapping from throwable to {@link ExitStatus}. Clients can modify
|
||||
* the exit code using a {@link StepExecutionListener}.
|
||||
|
||||
Reference in New Issue
Block a user