@Test public void testNullInput() { assertThat(DependencyUtil.isIgnorable(null), is(true)); }
@SuppressWarnings("squid:S4248") public static boolean isIgnorable(String className) { if (className == null) { return true; } String name = className.replaceAll("/", ".") .replaceAll("\\[\\]", ""); return IGNORE_CLASSNAMES.contains(name) || name.startsWith("java.lang."); }
DependencyUtil { @SuppressWarnings("squid:S4248") public static boolean isIgnorable(String className) { if (className == null) { return true; } String name = className.replaceAll("/", ".") .replaceAll("\\[\\]", ""); return IGNORE_CLASSNAMES.contains(name) || name.startsWith("java.lang."); } }
DependencyUtil { @SuppressWarnings("squid:S4248") public static boolean isIgnorable(String className) { if (className == null) { return true; } String name = className.replaceAll("/", ".") .replaceAll("\\[\\]", ""); return IGNORE_CLASSNAMES.contains(name) || name.startsWith("java.lang."); } private  DependencyUtil(); }
DependencyUtil { @SuppressWarnings("squid:S4248") public static boolean isIgnorable(String className) { if (className == null) { return true; } String name = className.replaceAll("/", ".") .replaceAll("\\[\\]", ""); return IGNORE_CLASSNAMES.contains(name) || name.startsWith("java.lang."); } private  DependencyUtil(); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static boolean isIgnorable(String className); }
DependencyUtil { @SuppressWarnings("squid:S4248") public static boolean isIgnorable(String className) { if (className == null) { return true; } String name = className.replaceAll("/", ".") .replaceAll("\\[\\]", ""); return IGNORE_CLASSNAMES.contains(name) || name.startsWith("java.lang."); } private  DependencyUtil(); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static boolean isIgnorable(String className);  }