diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-12-14 18:56:53 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-12-15 14:45:04 +0100 |
commit | 6e6f004f24142e3739c892bbee9153c26a51d0a1 (patch) | |
tree | b62be7b9d99be931fdf3cb996c63d8b5ea5dc0ab /sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java | |
parent | f708dfbad7bacac33b18bb5c7c1221565b803fa5 (diff) | |
download | sonarqube-6e6f004f24142e3739c892bbee9153c26a51d0a1.tar.gz sonarqube-6e6f004f24142e3739c892bbee9153c26a51d0a1.zip |
SONAR-7294 Replace Ruby WS api/issues/edit_comment
Diffstat (limited to 'sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java')
-rw-r--r-- | sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java b/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java index 95e33f0c7bd..ff7fcaa53fa 100644 --- a/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java +++ b/sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java @@ -106,17 +106,9 @@ public class IssueChangeDao implements Dao { } } - public boolean update(IssueChangeDto change) { - DbSession session = mybatis.openSession(false); - try { - IssueChangeMapper mapper = mapper(session); - int count = mapper.update(change); - session.commit(); - return count == 1; - - } finally { - MyBatis.closeQuietly(session); - } + public boolean update(DbSession dbSession, IssueChangeDto change) { + int count = mapper(dbSession).update(change); + return count == 1; } private static IssueChangeMapper mapper(DbSession session) { |