Martin Peřina has uploaded a new change for review.

Change subject: tools: Remove dead code from KerberosConfigCheck
......................................................................

tools: Remove dead code from KerberosConfigCheck

Removes dead code (not called from project) from KerberosConfigCheck
class.

Change-Id: I6521dd2b5bdc5ecc46b722528196886e4ee97328
Signed-off-by: Martin Perina <[email protected]>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/KerberosConfigCheck.java
1 file changed, 1 insertion(+), 46 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/24718/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/KerberosConfigCheck.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/KerberosConfigCheck.java
index f3a4531..304f8dc 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/KerberosConfigCheck.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/kerberos/KerberosConfigCheck.java
@@ -15,7 +15,6 @@
 
 import org.apache.log4j.Logger;
 import org.ovirt.engine.core.ldap.LdapProviderType;
-import org.ovirt.engine.core.utils.CLIParser;
 
 /**
  * Utility to verify Kerberos installation
@@ -46,33 +45,6 @@
         this(null, null);
     }
 
-    // This function gets the username and adjusts it doing the following:
-    // 1. If the username contains @, for example:
-    // user@domain, it returns user@DOMAIN
-    // 2. If the username doesn't contain @ it returns the input user name
-    // 3. For inputs like "@", "user@" and @domain it just returns the input
-    private static String adjustUserName(String userName) {
-        String returnUserName = userName;
-
-        if (userName.contains("@")) {
-            String[] parts = userName.split("@");
-            int numberOfParts = parts.length;
-
-            switch (numberOfParts) {
-            case 1:
-                returnUserName = parts[0];
-                break;
-            case 2:
-                returnUserName = parts[0] + '@' + parts[1].toUpperCase();
-                break;
-            default:
-                returnUserName = userName;
-                break;
-            }
-        }
-
-        return returnUserName;
-    }
     /**
      * JAAS callback handler. JAAS uses this class during login - it provides 
an array of callbacks (including the
      * NameCallback and PasswordCallback) It is the responsibility of the 
implementor of CallbackHandler to set the user
@@ -87,6 +59,7 @@
             this.password = password;
         }
 
+        @Override
         public void handle(Callback[] callbacks) throws java.io.IOException, 
UnsupportedCallbackException {
             for (int i = 0; i < callbacks.length; i++) {
                 if (callbacks[i] instanceof NameCallback) {
@@ -101,24 +74,6 @@
                 }
             }
         }
-    }
-
-    private void printUsage() {
-        System.out.println("Usage:");
-        System.out
-                .println("KerberosConfigCheck: -domains=<domains> -user=<user> 
-password=<password> -jaas_conf=<jaas conf path> krb5_conf_path=<krb5 conf 
path>");
-    }
-
-    private boolean validate(CLIParser parser) {
-        Arguments[] argsToValidate =
-                { Arguments.domains, Arguments.user, Arguments.password, 
Arguments.jaas_file, Arguments.krb5_conf_path };
-        for (Arguments argument : argsToValidate) {
-            if (!parser.hasArg(argument.name())) {
-                System.out.println(argument.name() + " is required");
-                return false;
-            }
-        }
-        return true;
     }
 
     public void checkInstallation(String domains,


-- 
To view, visit http://gerrit.ovirt.org/24718
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6521dd2b5bdc5ecc46b722528196886e4ee97328
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Martin Peřina <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to