Package 

Class PasswordUtil


  • 
    public class PasswordUtil
    
                        

    The utility class which can be used to clear passwords values from 'sun.java.command' system property.

    • Method Summary

      Modifier and Type Method Description
      static String replacePassword(String cmdLine, String passwordArg) The method will replace password argument values with 'X' in a stringwhich represents command line arguments(arg=value arg2=value4).
      static String replacePasswords(String string, Array<String> passwordArgs) Does replacePassword for every argument given inpasswordArgs array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • replacePassword

         static String replacePassword(String cmdLine, String passwordArg)

        The method will replace password argument values with 'X' in a stringwhich represents command line arguments(arg=value arg2=value4).

        Parameters:
        cmdLine - a string which represent command line arguments in a formwhere each argument is separated by space and value isassigned by '=' sign.
        passwordArg - the name of password argument to be shadowed.
      • replacePasswords

         static String replacePasswords(String string, Array<String> passwordArgs)

        Does replacePassword for every argument given inpasswordArgs array.

        Parameters:
        string - command line argument string, e.g.
        passwordArgs - the array which contains the names of passwordargument to be shadowed.