fix: 关闭sqlSession前判空 (#12538)

Co-authored-by: shiziyuan9527 <yuhao.li@fit2cloud.com>
This commit is contained in:
MeterSphere Bot 2022-04-12 18:38:28 +08:00 committed by GitHub
parent a7971d3e4f
commit 3fcd00a102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -920,7 +920,9 @@ public class TestPlanReportService {
sqlSession.flushStatements(); sqlSession.flushStatements();
} }
} finally { } finally {
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory); if (sqlSession != null && sqlSessionFactory != null) {
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
}
} }
} }