ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/2] ranger git commit: RANGER-1403:There is a problem in buildks class when delete invalid keystore file.
Date Tue, 28 Feb 2017 11:04:31 GMT
RANGER-1403:There is a problem in buildks class when delete invalid keystore file.

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/8cb01118
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/8cb01118
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/8cb01118

Branch: refs/heads/master
Commit: 8cb01118573e0778a627e67673c39ddd1b619621
Parents: 674cab3
Author: zhangqiang2 <zhangqiang2@zte.com.cn>
Authored: Wed Feb 22 02:11:15 2017 -0500
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Feb 28 10:58:57 2017 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/ranger/credentialapi/buildks.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/8cb01118/credentialbuilder/src/main/java/org/apache/ranger/credentialapi/buildks.java
----------------------------------------------------------------------
diff --git a/credentialbuilder/src/main/java/org/apache/ranger/credentialapi/buildks.java
b/credentialbuilder/src/main/java/org/apache/ranger/credentialapi/buildks.java
index 7978d8d..a7e433f 100644
--- a/credentialbuilder/src/main/java/org/apache/ranger/credentialapi/buildks.java
+++ b/credentialbuilder/src/main/java/org/apache/ranger/credentialapi/buildks.java
@@ -535,7 +535,7 @@ public class buildks {
 			}
 			if(keystore!=null && !keystore.isEmpty()){
 				File file =new File(keystore);
-				if(file!=null && file.length()==0){
+				if(file!=null && file.exists() && file.length()==0){
 					System.out.println("Provider file '"+keystore+"' is in invalid state or corrupt!! will
try to delete first.");
 					file.delete();
 					file=null;


Mime
View raw message