vpelikh commented on code in PR #4153:
URL: https://github.com/apache/logging-log4j2/pull/4153#discussion_r3811019172
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/filter/StringMatchFilter.java:
##########
@@ -230,28 +239,43 @@ public String toString() {
}
@PluginFactory
- public static StringMatchFilter.Builder newBuilder() {
- return new StringMatchFilter.Builder();
+ public static Builder newBuilder() {
+ return new Builder();
}
- public static class Builder extends
AbstractFilterBuilder<StringMatchFilter.Builder>
- implements
org.apache.logging.log4j.core.util.Builder<StringMatchFilter> {
+ public static class Builder extends AbstractFilterBuilder<Builder>
+ implements
org.apache.logging.log4j.plugins.util.Builder<StringMatchFilter> {
+
@PluginBuilderAttribute
- private String text = "";
+ @Required(message = "No text provided for StringMatchFilter")
+ private String text;
/**
* Sets the text to search in event messages.
* @param text the text to search in event messages.
* @return this instance.
*/
- public StringMatchFilter.Builder setMatchString(final String text) {
- this.text = text;
+ public Builder setText(@NonNull final String text) {
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]