You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pr...@apache.org on 2018/09/26 16:39:25 UTC
[3/3] ranger git commit: RANGER-1403:There is a problem in buildks
class when delete invalid keystore file.
RANGER-1403:There is a problem in buildks class when delete invalid keystore file.
Signed-off-by: Colm O hEigeartaigh <co...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/1de5cab1
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/1de5cab1
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/1de5cab1
Branch: refs/heads/ranger-0.7
Commit: 1de5cab130c4d3b85a56ee96ae33539ba7b2ad52
Parents: 8a8bcd1
Author: zhangqiang2 <zh...@zte.com.cn>
Authored: Wed Feb 22 02:11:15 2017 -0500
Committer: Pradeep <pr...@apache.org>
Committed: Wed Sep 26 21:17:10 2018 +0530
----------------------------------------------------------------------
.../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/1de5cab1/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 043f44c..eb38506 100644
--- a/credentialbuilder/src/main/java/org/apache/ranger/credentialapi/buildks.java
+++ b/credentialbuilder/src/main/java/org/apache/ranger/credentialapi/buildks.java
@@ -527,7 +527,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;