Repository: incubator-ranger
Updated Branches:
  refs/heads/master 59ba1acf1 -> efbed804f


Whitespace cleanup


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

Branch: refs/heads/master
Commit: efbed804f503416cb6a6d051d6283f60758859f9
Parents: 59ba1ac
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Wed Nov 2 10:13:08 2016 +0000
Committer: Colm O hEigeartaigh <cohei...@apache.org>
Committed: Wed Nov 2 10:13:08 2016 +0000

----------------------------------------------------------------------
 .../ranger/services/knox/client/KnoxClient.java | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/efbed804/knox-agent/src/main/java/org/apache/ranger/services/knox/client/KnoxClient.java
----------------------------------------------------------------------
diff --git 
a/knox-agent/src/main/java/org/apache/ranger/services/knox/client/KnoxClient.java
 
b/knox-agent/src/main/java/org/apache/ranger/services/knox/client/KnoxClient.java
index daf6f9b..e9c27d6 100644
--- 
a/knox-agent/src/main/java/org/apache/ranger/services/knox/client/KnoxClient.java
+++ 
b/knox-agent/src/main/java/org/apache/ranger/services/knox/client/KnoxClient.java
@@ -62,7 +62,7 @@ public class KnoxClient {
                this.password = password;
        }
 
-       public  List<String> getTopologyList(String 
topologyNameMatching,List<String> knoxTopologyList) {
+       public List<String> getTopologyList(String 
topologyNameMatching,List<String> knoxTopologyList) {
                
                // sample URI: 
https://hdp.example.com:8443/gateway/admin/api/v1/topologies
                LOG.debug("Getting Knox topology list for topologyNameMatching 
: " +
@@ -71,17 +71,17 @@ public class KnoxClient {
                String errMsg = " You can still save the repository and start 
creating "
                                + "policies, but you would not be able to use 
autocomplete for "
                                + "resource names. Check ranger_admin.log for 
more info.";
-               if ( topologyNameMatching == null ||  
topologyNameMatching.trim().isEmpty()) {
+               if (topologyNameMatching == null ||  
topologyNameMatching.trim().isEmpty()) {
                        topologyNameMatching = "";
                }
                String decryptedPwd=null;
-               try{
+               try {
                        decryptedPwd=PasswordUtils.decryptPassword(password);
-               }catch(Exception ex){
+               } catch(Exception ex) {
                        LOG.info("Password decryption failed; trying knox 
connection with received password string");
                        decryptedPwd=null;
-               }finally{
-                       if(decryptedPwd==null){
+               } finally {
+                       if (decryptedPwd==null) {
                                decryptedPwd=password;
                        }
                }
@@ -128,7 +128,7 @@ public class KnoxClient {
 
                                                }
                                        } else {
-                                               LOG.error("Got invalid  REST 
response from: "+ knoxUrl + ", responsStatus: " + response.getStatus());
+                                               LOG.error("Got invalid REST 
response from: " + knoxUrl + ", responseStatus: " + response.getStatus());
                                        }
 
                                } else {
@@ -173,17 +173,17 @@ public class KnoxClient {
                String errMsg = " You can still save the repository and start 
creating "
                                + "policies, but you would not be able to use 
autocomplete for "
                                + "resource names. Check ranger_admin.log for 
more info.";
-               if ( serviceNameMatching == null ||  
serviceNameMatching.trim().isEmpty()) {
+               if (serviceNameMatching == null ||  
serviceNameMatching.trim().isEmpty()) {
                        serviceNameMatching = "";
                }
                String decryptedPwd=null;
-               try{
+               try {
                        decryptedPwd=PasswordUtils.decryptPassword(password);
-               }catch(Exception ex){
+               } catch(Exception ex) {
                        LOG.info("Password decryption failed; trying knox 
connection with received password string");
                        decryptedPwd=null;
-               }finally{
-                       if(decryptedPwd==null){
+               } finally {
+                       if (decryptedPwd==null) {
                                decryptedPwd=password;
                        }
                }
@@ -412,7 +412,7 @@ public class KnoxClient {
                                        BaseClient.getMessage(e), msgDesc + 
errMsg, null, null);
                        throw hdpException;
                }
-               if(LOG.isDebugEnabled()) {
+               if (LOG.isDebugEnabled()) {
                        LOG.debug("<== KnoxClient.getKnoxResources() Result : 
"+ resultList  );
                }
                return resultList;

Reply via email to