Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javadoc - AbstractFilterable#isFiltered incorrect #3300

Open
JWT007 opened this issue Dec 17, 2024 · 1 comment
Open

Javadoc - AbstractFilterable#isFiltered incorrect #3300

JWT007 opened this issue Dec 17, 2024 · 1 comment

Comments

@JWT007
Copy link
Contributor

JWT007 commented Dec 17, 2024

Log4j 2.24.3 - AbstractFilterable

If I am not mistaken, the Javadoc of the 'AbstractFilterable#isFiltered' method is incorrect.

    /**
     * Determine if the LogEvent should be processed or ignored.
     * @param event The LogEvent.
     * @return true if the LogEvent should be processed.
     */
    @Override
    public boolean isFiltered(final LogEvent event) {
        return filter != null && filter.filter(event) == Filter.Result.DENY;
    }

I believe that correct would be:

@return {@code true} if the event is filtered and should be ignored; otherwise, {@code false} if it should be processed

@ppkarwasz
Copy link
Contributor

@JWT007,

Nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants