From 63f2d6ab1531cf848759e5cc502d676865ffcb9e Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 25 Apr 2014 10:59:52 +0100 Subject: [PATCH] Remove compiler warnings related to Batch upgrade --- .../boot/autoconfigure/batch/BatchAutoConfiguration.java | 2 +- .../boot/autoconfigure/batch/BatchAutoConfigurationTests.java | 2 +- .../autoconfigure/batch/JobLauncherCommandLineRunnerTests.java | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java index 85e69b3b21..6571c0ac74 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java @@ -101,7 +101,7 @@ public class BatchAutoConfiguration { JobExplorerFactoryBean factory = new JobExplorerFactoryBean(); factory.setDataSource(dataSource); factory.afterPropertiesSet(); - return (JobExplorer) factory.getObject(); + return factory.getObject(); } @Bean diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java index 48d15026f0..12ae38c7af 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java @@ -253,7 +253,7 @@ public class BatchAutoConfigurationTests { MapJobExplorerFactoryBean explorer = new MapJobExplorerFactoryBean( this.factory); explorer.afterPropertiesSet(); - return (JobExplorer) explorer.getObject(); + return explorer.getObject(); } } 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 b78602a87f..3328c5a48f 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 @@ -179,8 +179,7 @@ public class JobLauncherCommandLineRunnerTests { @Bean public JobExplorer jobExplorer() throws Exception { - return (JobExplorer) new MapJobExplorerFactoryBean(this.jobRepositoryFactory) - .getObject(); + return new MapJobExplorerFactoryBean(this.jobRepositoryFactory).getObject(); } }