未验证 提交 78bfe918 编写于 作者: Y Yelli 提交者: GitHub

change datasource null check position (#1883)

上级 42b3e5bd
...@@ -123,19 +123,21 @@ public class SqlTask extends AbstractTask { ...@@ -123,19 +123,21 @@ public class SqlTask extends AbstractTask {
} }
dataSource= processDao.findDataSourceById(sqlParameters.getDatasource()); dataSource= processDao.findDataSourceById(sqlParameters.getDatasource());
logger.info("datasource name : {} , type : {} , desc : {} , user_id : {} , parameter : {}",
dataSource.getName(),
dataSource.getType(),
dataSource.getNote(),
dataSource.getUserId(),
dataSource.getConnectionParams());
// data source is null
if (dataSource == null){ if (dataSource == null){
logger.error("datasource not exists"); logger.error("datasource not exists");
exitStatusCode = -1; exitStatusCode = -1;
return; return;
} }
logger.info("datasource name : {} , type : {} , desc : {} , user_id : {} , parameter : {}",
dataSource.getName(),
dataSource.getType(),
dataSource.getNote(),
dataSource.getUserId(),
dataSource.getConnectionParams());
Connection con = null; Connection con = null;
List<String> createFuncs = null; List<String> createFuncs = null;
try { try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册