Skip to content

Javadoc - AbstractFilterable#isFiltered incorrect #3300

Closed
@JWT007

Description

@JWT007

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions