Browse Source

Remove compiler warnings related to Batch upgrade

pull/727/merge
Dave Syer 12 years ago
parent
commit
63f2d6ab15
  1. 2
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java
  2. 2
      spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
  3. 3
      spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java

2
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java

@ -101,7 +101,7 @@ public class BatchAutoConfiguration { @@ -101,7 +101,7 @@ public class BatchAutoConfiguration {
JobExplorerFactoryBean factory = new JobExplorerFactoryBean();
factory.setDataSource(dataSource);
factory.afterPropertiesSet();
return (JobExplorer) factory.getObject();
return factory.getObject();
}
@Bean

2
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java

@ -253,7 +253,7 @@ public class BatchAutoConfigurationTests { @@ -253,7 +253,7 @@ public class BatchAutoConfigurationTests {
MapJobExplorerFactoryBean explorer = new MapJobExplorerFactoryBean(
this.factory);
explorer.afterPropertiesSet();
return (JobExplorer) explorer.getObject();
return explorer.getObject();
}
}

3
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunnerTests.java

@ -179,8 +179,7 @@ public class JobLauncherCommandLineRunnerTests { @@ -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();
}
}

Loading…
Cancel
Save