@Test public void testHidePasswordDoubleQuote() { String testData = " DC=hortonworks,DC=com \"--ldap-manager-password=2#KQ01DLbUdljJ!AVs\" --ldap-sync-usern\" sd dsds \""; Assert.assertEquals(" DC=hortonworks,DC=com \"--ldap-manager-password=" + REPLACEMENT + "\" --ldap-sync-usern\" sd dsds \"", anonymize(testData)); }
public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); static String anonymize(String content); }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); static String anonymize(String content); static final String REPLACEMENT; }