Skip to content

Plugins should either have a builder or a factory method #3126

@ppkarwasz

Description

@ppkarwasz

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:

@PluginFactory
@Deprecated
public static PatternLayout createLayout(

@PluginBuilderFactory
public static Builder newBuilder() {

This rule should probably be enforced by the annotation processor.

Metadata

Metadata

Assignees

Labels

bugIncorrect, unexpected, or unintended behavior of existing code

Type

No type

Projects

Status

To triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions