ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhangqi...@apache.org
Subject ranger git commit: RANGER-1815:Fix invalid code and logic for BaseDao class
Date Tue, 10 Oct 2017 01:50:24 GMT
Repository: ranger
Updated Branches:
  refs/heads/master a341fa1af -> ea9d66a24


RANGER-1815:Fix invalid code and logic for BaseDao class

Signed-off-by: zhangqiang2 <zhangqiang2@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.jianhua@zte.com.cn>
Authored: Thu Sep 28 20:24:06 2017 +0800
Committer: zhangqiang2 <zhangqiang2@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) {


Mime
View raw message