apache / apache/logging-log4j2

Plugins should either have a builder or a factory method

Open
#3,126 2 comments 0 reactions 1 assignee Claimed by @ppkarwasz View on GitHub
bug
Dominant language
Java
Stars
3.6k
Forks
1.7k
Avg merge
21h 30m
Merged PRs (30d)
27

Description

Log4j plugin should either have a builder annotated with `@PluginBuilderFactory` or a factory method annotated with `@PluginFactory`. As it turns out, some of them have both, for example `PatternLayout`:

https://github.com/apache/logging-log4j2/blob/f786b51c3ef32e460bb6fedf21e9de90caff881e/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java#L301-L303

https://github.com/apache/logging-log4j2/blob/f786b51c3ef32e460bb6fedf21e9de90caff881e/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java#L624-L625

This rule should probably be enforced by the annotation processor.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.