Repository: ranger Updated Branches: refs/heads/master a341fa1af -> ea9d66a24
RANGER-1815:Fix invalid code and logic for BaseDao class Signed-off-by: zhangqiang2 <zhangqia...@zte.com.cn> Project: http://git-wip-us.apache.org/repos/asf/ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/ea9d66a2 Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/ea9d66a2 Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/ea9d66a2 Branch: refs/heads/master Commit: ea9d66a249a169e2de8f90e0452a684c2629e762 Parents: a341fa1 Author: peng.jianhua <peng.jian...@zte.com.cn> Authored: Thu Sep 28 20:24:06 2017 +0800 Committer: zhangqiang2 <zhangqia...@zte.com.cn> Committed: Mon Oct 9 21:49:59 2017 -0400 ---------------------------------------------------------------------- .../src/main/java/org/apache/ranger/audit/dao/BaseDao.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/ea9d66a2/agents-audit/src/main/java/org/apache/ranger/audit/dao/BaseDao.java ---------------------------------------------------------------------- diff --git a/agents-audit/src/main/java/org/apache/ranger/audit/dao/BaseDao.java b/agents-audit/src/main/java/org/apache/ranger/audit/dao/BaseDao.java index 75593d2..124f89e 100644 --- a/agents-audit/src/main/java/org/apache/ranger/audit/dao/BaseDao.java +++ b/agents-audit/src/main/java/org/apache/ranger/audit/dao/BaseDao.java @@ -144,8 +144,6 @@ public abstract class BaseDao<T> { return true; } - boolean ret = false; - boolean trxBegan = beginTransaction(); getEntityManager().remove(obj); @@ -154,9 +152,7 @@ public abstract class BaseDao<T> { commitTransaction(); } - ret = true; - - return ret; + return trxBegan; } public T getById(Long id) {