pingsutw commented on a change in pull request #85: SUBMARINE-284. Method
invocation `SqlSession#close` may produce NPE
URL: https://github.com/apache/submarine/pull/85#discussion_r343634971
##########
File path:
submarine-workbench/workbench-server/src/main/java/org/apache/submarine/rest/SysDeptRestApi.java
##########
@@ -195,18 +180,14 @@ public Response edit(SysDept sysDept) {
@SubmarineApi
public Response resetParentDept() {
LOG.info("resetParentDept()");
- SqlSession sqlSession = null;
- try {
- sqlSession = MyBatisUtil.getSqlSession();
+ try ( SqlSession sqlSession = MyBatisUtil.getSqlSession()) {
Review comment:
Need to remove extra whitespace
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]