Polish
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
@@ -58,8 +58,6 @@ public class DefaultTaskConfigurer implements TaskConfigurer {
|
||||
|
||||
private PlatformTransactionManager transactionManager;
|
||||
|
||||
private TaskExecutionDaoFactoryBean taskExecutionDaoFactoryBean;
|
||||
|
||||
private DataSource dataSource;
|
||||
|
||||
private ApplicationContext context;
|
||||
@@ -104,15 +102,18 @@ public class DefaultTaskConfigurer implements TaskConfigurer {
|
||||
this.dataSource = dataSource;
|
||||
this.context = context;
|
||||
|
||||
TaskExecutionDaoFactoryBean taskExecutionDaoFactoryBean;
|
||||
|
||||
if(this.dataSource != null) {
|
||||
this.taskExecutionDaoFactoryBean = new
|
||||
taskExecutionDaoFactoryBean = new
|
||||
TaskExecutionDaoFactoryBean(this.dataSource, tablePrefix);
|
||||
}
|
||||
else {
|
||||
this.taskExecutionDaoFactoryBean = new TaskExecutionDaoFactoryBean();
|
||||
taskExecutionDaoFactoryBean = new TaskExecutionDaoFactoryBean();
|
||||
}
|
||||
this.taskRepository = new SimpleTaskRepository(this.taskExecutionDaoFactoryBean);
|
||||
this.taskExplorer = new SimpleTaskExplorer(this.taskExecutionDaoFactoryBean);
|
||||
|
||||
this.taskRepository = new SimpleTaskRepository(taskExecutionDaoFactoryBean);
|
||||
this.taskExplorer = new SimpleTaskExplorer(taskExecutionDaoFactoryBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
|
||||
@@ -287,7 +287,7 @@ public class TaskLifecycleListener implements ApplicationListener<ApplicationEve
|
||||
private TaskExecution invokeOnTaskStartup(TaskExecution taskExecution){
|
||||
TaskExecution listenerTaskExecution = getTaskExecutionCopy(taskExecution);
|
||||
List<TaskExecutionListener> startupListenerList = new ArrayList<>(this.taskExecutionListeners);
|
||||
if (startupListenerList != null) {
|
||||
if (!CollectionUtils.isEmpty(startupListenerList)) {
|
||||
try {
|
||||
Collections.reverse(startupListenerList);
|
||||
for (TaskExecutionListener taskExecutionListener : startupListenerList) {
|
||||
@@ -400,7 +400,7 @@ public class TaskLifecycleListener implements ApplicationListener<ApplicationEve
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
* Copyright 2015-2018 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.
|
||||
|
||||
@@ -38,7 +38,6 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
Reference in New Issue
Block a user