You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2023/05/07 22:52:08 UTC

[logging-log4j2] 07/23: Fix nullability docs in `StrSubstitutor` (#1422)

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch LoggerContextProperties
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 06018e8dfb08c296a8651906bdac5ee454b61f13
Author: Michael Ernst <me...@alum.mit.edu>
AuthorDate: Tue Apr 11 01:36:54 2023 -0700

    Fix nullability docs in `StrSubstitutor` (#1422)
---
 .../java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java
index 6802123ba4..2f2e8436e4 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java
@@ -1235,13 +1235,13 @@ public class StrSubstitutor implements ConfigurationAware {
      * allowing advanced prefix matches.
      * </p>
      *
-     * @param prefixMatcher  the prefix matcher to use, null ignored
+     * @param prefixMatcher  the prefix matcher to use, must not be null
      * @return this, to enable chaining
      * @throws IllegalArgumentException if the prefix matcher is null
      */
     public StrSubstitutor setVariablePrefixMatcher(final StrMatcher prefixMatcher) {
         if (prefixMatcher == null) {
-            throw new IllegalArgumentException("Variable prefix matcher must not be null!");
+            throw new IllegalArgumentException("Parameter prefixMatcher must not be null!");
         }
         this.prefixMatcher = prefixMatcher;
         return this;
@@ -1304,13 +1304,13 @@ public class StrSubstitutor implements ConfigurationAware {
      * allowing advanced suffix matches.
      * </p>
      *
-     * @param suffixMatcher  the suffix matcher to use, null ignored
+     * @param suffixMatcher  the suffix matcher to use, must not be null
      * @return this, to enable chaining
      * @throws IllegalArgumentException if the suffix matcher is null
      */
     public StrSubstitutor setVariableSuffixMatcher(final StrMatcher suffixMatcher) {
         if (suffixMatcher == null) {
-            throw new IllegalArgumentException("Variable suffix matcher must not be null!");
+            throw new IllegalArgumentException("Parameter suffixMatcher must not be null!");
         }
         this.suffixMatcher = suffixMatcher;
         return this;