@Override public boolean canConvert(Class type) { if (type == null) { return false; } String name = type.getName(); if (JRUBY_PROXY.matcher(name).matches()) { return false; } // claim we can convert all the scary stuff so we can throw exceptions when attempting to do so return ClassFilter.DEFAULT.isBlacklisted(name) || ClassFilter.DEFAULT.isBlacklisted(type); } }
return false; if (ClassFilter.STANDARD.isBlacklisted(c)) { // currently never true, but may issue diagnostics notifyRejected(_c, _c.getName(), String.format("%s is not permitted ", _c.getName())); return true;
if (ClassFilter.STANDARD.isBlacklisted(name)) { if (SUPPRESS_ALL) { notifyRejected(null, name,
@Override public boolean isBlacklisted(String name) { return CURRENT_DEFAULT.isBlacklisted(name); } };
@Override public boolean isBlacklisted(Class c) { return CURRENT_DEFAULT.isBlacklisted(c); } @Override
/** * API version of {@link #isBlacklisted(String)} SPI. * @return the same {@code name} * @throws SecurityException if it is blacklisted */ public final String check(String name) { if (isBlacklisted(name)) { throw new SecurityException("Rejected: " + name + "; see https://jenkins.io/redirect/class-filter/"); } return name; }
/** * API version of {@link #isBlacklisted(Class)} SPI. * @return the same {@code c} * @throws SecurityException if it is blacklisted */ public final Class check(Class c) { if (isBlacklisted(c)) { throw new SecurityException("Rejected: " + c.getName() + "; see https://jenkins.io/redirect/class-filter/"); } return c; }