]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4535 Close session when adding a new profile
authorJulien Lancelot <julien.lancelot@gmail.com>
Sun, 15 Dec 2013 13:08:40 +0000 (14:08 +0100)
committerJulien Lancelot <julien.lancelot@gmail.com>
Sun, 15 Dec 2013 13:08:40 +0000 (14:08 +0100)
sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileOperations.java

index 95a42a10dfb8dea663ac7f9427db20c179276714..b6ed6b8c7a4489eeaae46e0805c1831d6d2b7c9b 100644 (file)
@@ -84,11 +84,12 @@ public class QProfileOperations implements ServerComponent {
         importProfile(dto, rulesProfile, sqlSession);
       }
       result.setProfile(QProfile.from(dto));
-    } finally {
       sqlSession.commit();
+    } finally {
+      MyBatis.closeQuietly(sqlSession);
       dryRunCache.reportGlobalModification();
-      return result;
     }
+    return result;
   }
 
   public void renameProfile(String name, String language, String newName, UserSession userSession) {