class WhitelistObjectInputFilter implements ObjectInputFilter {

    private final Set<Class<?>> whitelist;

    public WhitelistObjectInputFilter(@NotNull final Class<?>... whitelist) {
        this.whitelist = Set.of(whitelist);
    }

    @Override
    public Status checkInput(final FilterInfo filterInfo) {<FILL_FUNCTION_BODY>}
}

        if (filterInfo.serialClass() == null || whitelist.contains(filterInfo.serialClass())) {
            return Status.ALLOWED;
        }
        return Status.REJECTED;
    
<no_super_class>