Polish
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -83,7 +83,7 @@ public class SimpleJobBuilder extends JobBuilderHelper<SimpleJobBuilder> {
|
||||
* @return a builder for fluent chaining
|
||||
*/
|
||||
public FlowBuilder.TransitionBuilder<FlowJobBuilder> on(String pattern) {
|
||||
Assert.state(steps.size() > 0, "You have to start a job with a step");
|
||||
Assert.state(!steps.isEmpty(), "You have to start a job with a step");
|
||||
for (Step step : steps) {
|
||||
if (builder == null) {
|
||||
builder = new JobFlowBuilder(new FlowJobBuilder(this), step);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
* Copyright 2006-2024 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.
|
||||
@@ -156,7 +156,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
|
||||
|
||||
List<ExecutionContext> results = getJdbcTemplate().query(getQuery(FIND_JOB_EXECUTION_CONTEXT),
|
||||
new ExecutionContextRowMapper(), executionId);
|
||||
if (results.size() > 0) {
|
||||
if (!results.isEmpty()) {
|
||||
return results.get(0);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -180,7 +180,7 @@ public abstract class AbstractTaskletStepBuilder<B extends AbstractTaskletStepBu
|
||||
chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunk.class));
|
||||
chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunkError.class));
|
||||
|
||||
if (chunkListenerMethods.size() > 0) {
|
||||
if (!chunkListenerMethods.isEmpty()) {
|
||||
StepListenerFactoryBean factory = new StepListenerFactoryBean();
|
||||
factory.setDelegate(listener);
|
||||
this.listener((ChunkListener) factory.getObject());
|
||||
|
||||
@@ -199,7 +199,7 @@ public class FaultTolerantStepBuilder<I, O> extends SimpleStepBuilder<I, O> {
|
||||
skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInProcess.class));
|
||||
skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInWrite.class));
|
||||
|
||||
if (skipListenerMethods.size() > 0) {
|
||||
if (!skipListenerMethods.isEmpty()) {
|
||||
StepListenerFactoryBean factory = new StepListenerFactoryBean();
|
||||
factory.setDelegate(listener);
|
||||
skipListeners.add((SkipListener<I, O>) factory.getObject());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2023 the original author or authors.
|
||||
* Copyright 2006-2024 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.
|
||||
@@ -269,7 +269,7 @@ public class SimpleStepBuilder<I, O> extends AbstractTaskletStepBuilder<SimpleSt
|
||||
itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnProcessError.class));
|
||||
itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnWriteError.class));
|
||||
|
||||
if (itemListenerMethods.size() > 0) {
|
||||
if (!itemListenerMethods.isEmpty()) {
|
||||
StepListenerFactoryBean factory = new StepListenerFactoryBean();
|
||||
factory.setDelegate(listener);
|
||||
itemListeners.add((StepListener) factory.getObject());
|
||||
|
||||
Reference in New Issue
Block a user