From 1a60056f9e69d5f75bfd9dfc2ba3076f45525708 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 2 Sep 2015 16:52:31 +0200 Subject: [PATCH] Polish contribution Closes gh-3831 --- .../batch/JobLauncherCommandLineRunner.java | 3 ++- .../batch/JobLauncherCommandLineRunnerTests.java | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunner.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunner.java index d7f0635d4e..6a5c99ed40 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunner.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2015 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. @@ -59,6 +59,7 @@ import org.springframework.util.StringUtils; * by providing a jobName * * @author Dave Syer + * @author Jean-Pierre Bergamin */ @Component public class JobLauncherCommandLineRunner implements CommandLineRunner, diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java index d10586bddb..14612fb5c8 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2015 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. @@ -16,8 +16,6 @@ package org.springframework.boot.autoconfigure.batch; -import static org.junit.Assert.assertEquals; - import org.junit.Before; import org.junit.Test; import org.springframework.batch.core.Job; @@ -45,10 +43,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.task.SyncTaskExecutor; import org.springframework.transaction.PlatformTransactionManager; +import static org.junit.Assert.assertEquals; + /** * Tests for {@link JobLauncherCommandLineRunner}. * * @author Dave Syer + * @author Jean-Pierre Bergamin */ public class JobLauncherCommandLineRunnerTests { @@ -136,9 +137,8 @@ public class JobLauncherCommandLineRunnerTests { }).build()).incrementer(new RunIdIncrementer()).build(); this.runner.execute(this.job, new JobParameters()); this.runner.execute(this.job, new JobParameters()); - /* A failed job that is not restartable does not re-use the job params of - * the last execution, but creates a new job instance when running it again. - */ + // A failed job that is not restartable does not re-use the job params of + // the last execution, but creates a new job instance when running it again. assertEquals(2, this.jobExplorer.getJobInstances("job", 0, 100).size()); }