@Test public void maskNonPrintable() { String input = ""; String result = Utilities.maskNonPrintables(input); assertEquals("", result); input = null; result = Utilities.maskNonPrintables(input); assertNull(result); input = "Lucy in the sky"; result = Utilities.maskNonPrintables(input); assertEquals("Lucy.in.the.sky", result); input = "with <$$$@#$!000diamonds!!?!$#&%/>"; result = Utilities.maskNonPrintables(input); assertEquals("with.........000diamonds......../.", result); input = "http: result = Utilities.maskNonPrintables(input); assertEquals("http: }
public static String maskNonPrintables(String input) { if (StringUtils.isEmpty(input)) { return input; } return input.replaceAll("[^a-zA-Z0-9_:/-]", "."); }
Utilities { public static String maskNonPrintables(String input) { if (StringUtils.isEmpty(input)) { return input; } return input.replaceAll("[^a-zA-Z0-9_:/-]", "."); } }
Utilities { public static String maskNonPrintables(String input) { if (StringUtils.isEmpty(input)) { return input; } return input.replaceAll("[^a-zA-Z0-9_:/-]", "."); }  }
Utilities { public static String maskNonPrintables(String input) { if (StringUtils.isEmpty(input)) { return input; } return input.replaceAll("[^a-zA-Z0-9_:/-]", "."); }  static byte[] parseBase64(String encoded, String paramName); static boolean isValidDirectoryName(String name); static boolean isValidRestrictedDirectoryName(String name); static Object createAnyInstance(Class<?> confClass,
                                           String className, RequestContext metaData); static Object createAnyInstance(String className); static void byteArrayToOctalString(byte[] bytes, StringBuilder sb); static String maskNonPrintables(String input); static FragmentMetadata parseFragmentMetadata(RequestContext context); static boolean aggregateOptimizationsSupported(RequestContext requestContext); static boolean implementsInterface(String className, Class<?> iface); static boolean isFragmenterCacheEnabled(); static String absoluteDataPath(String dataSource); static boolean isSecurityEnabled(Configuration configuration); static String rightTrimWhiteSpace(String s); static String getHost(String uri); }
Utilities { public static String maskNonPrintables(String input) { if (StringUtils.isEmpty(input)) { return input; } return input.replaceAll("[^a-zA-Z0-9_:/-]", "."); }  static byte[] parseBase64(String encoded, String paramName); static boolean isValidDirectoryName(String name); static boolean isValidRestrictedDirectoryName(String name); static Object createAnyInstance(Class<?> confClass,
                                           String className, RequestContext metaData); static Object createAnyInstance(String className); static void byteArrayToOctalString(byte[] bytes, StringBuilder sb); static String maskNonPrintables(String input); static FragmentMetadata parseFragmentMetadata(RequestContext context); static boolean aggregateOptimizationsSupported(RequestContext requestContext); static boolean implementsInterface(String className, Class<?> iface); static boolean isFragmenterCacheEnabled(); static String absoluteDataPath(String dataSource); static boolean isSecurityEnabled(Configuration configuration); static String rightTrimWhiteSpace(String s); static String getHost(String uri); static final Pattern SCHEME_PATTERN; static final Pattern NON_HOSTNAME_CHARACTERS; }