@Test public void whiteList() { assertFalse(new BlacklistClassResolver(null, new String[] { "org.apache.xalan" }).isBlacklisted("org.apache.xalan.Foo")); }
protected boolean isBlacklisted(final String name) { if (PRIMITIVE_ARRAY.matcher(name).matches()) { return false; } if (name != null && name.startsWith("[L") && name.endsWith(";")) { return isBlacklisted(name.substring(2, name.length() - 1)); } return (whitelist != null && !contains(whitelist, name)) || contains(blacklist, name); }
BlacklistClassResolver { protected boolean isBlacklisted(final String name) { if (PRIMITIVE_ARRAY.matcher(name).matches()) { return false; } if (name != null && name.startsWith("[L") && name.endsWith(";")) { return isBlacklisted(name.substring(2, name.length() - 1)); } return (whitelist != null && !contains(whitelist, name)) || contains(blacklist, name); } }
BlacklistClassResolver { protected boolean isBlacklisted(final String name) { if (PRIMITIVE_ARRAY.matcher(name).matches()) { return false; } if (name != null && name.startsWith("[L") && name.endsWith(";")) { return isBlacklisted(name.substring(2, name.length() - 1)); } return (whitelist != null && !contains(whitelist, name)) || contains(blacklist, name); } protected  BlacklistClassResolver(final String[] blacklist, final String[] whitelist); }
BlacklistClassResolver { protected boolean isBlacklisted(final String name) { if (PRIMITIVE_ARRAY.matcher(name).matches()) { return false; } if (name != null && name.startsWith("[L") && name.endsWith(";")) { return isBlacklisted(name.substring(2, name.length() - 1)); } return (whitelist != null && !contains(whitelist, name)) || contains(blacklist, name); } protected  BlacklistClassResolver(final String[] blacklist, final String[] whitelist); final ObjectStreamClass check(final ObjectStreamClass classDesc); final String check(final String name); }
BlacklistClassResolver { protected boolean isBlacklisted(final String name) { if (PRIMITIVE_ARRAY.matcher(name).matches()) { return false; } if (name != null && name.startsWith("[L") && name.endsWith(";")) { return isBlacklisted(name.substring(2, name.length() - 1)); } return (whitelist != null && !contains(whitelist, name)) || contains(blacklist, name); } protected  BlacklistClassResolver(final String[] blacklist, final String[] whitelist); final ObjectStreamClass check(final ObjectStreamClass classDesc); final String check(final String name); static final BlacklistClassResolver DEFAULT; static final Pattern PRIMITIVE_ARRAY; }