From 6e6f004f24142e3739c892bbee9153c26a51d0a1 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 14 Dec 2016 18:56:53 +0100 Subject: SONAR-7294 Replace Ruby WS api/issues/edit_comment --- .../src/main/java/org/sonar/db/issue/IssueChangeDao.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'sonar-db/src/main/java/org/sonar/db/issue/IssueChangeDao.java') 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) { -- cgit v1.2.3