-
public class PasswordUtilThe utility class which can be used to clear passwords values from 'sun.java.command' system property.
-
-
Method Summary
Modifier and Type Method Description static StringreplacePassword(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 StringreplacePasswords(String string, Array<String> passwordArgs)Does replacePassword for every argument given inpasswordArgs array. -
-
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.
-
-
-
-