You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "JWT007 (via GitHub)" <gi...@apache.org> on 2024/11/18 17:05:28 UTC

[I] RegexReplacement static factory method doesn't handle null 'replacement' attribute correctly (logging-log4j2)

JWT007 opened a new issue, #3215:
URL: https://github.com/apache/logging-log4j2/issues/3215

   RegexReplacement#createRegexReplacement
   
   Static builder method returns `null`if the `regex`attribute is null, but although it logs an error it does not return `null` if the `replacement` attribute is `null`.
   
   ```
   public static RegexReplacement createRegexReplacement(
           @PluginAttribute("regex") final Pattern regex, @PluginAttribute("replacement") final String replacement) {
       if (regex == null) {
           LOGGER.error("A regular expression is required for replacement");
           return null;
       }
       if (replacement == null) {
           LOGGER.error("A replacement string is required to perform replacement");
       }
       // FIXME: should we use Matcher.quoteReplacement() here?
       return new RegexReplacement(regex, replacement);
   }
   ```


-- 
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: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] RegexReplacement static factory method doesn't handle null 'replacement' attribute correctly [logging-log4j2]

Posted by "ramanathan1504 (via GitHub) via notifications" <no...@logging.apache.org>.
ramanathan1504 commented on issue #3215:
URL: https://github.com/apache/logging-log4j2/issues/3215#issuecomment-6703242422

   Fixed by #3457, released in 2.25.0. Closing as completed.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] RegexReplacement static factory method doesn't handle null 'replacement' attribute correctly (logging-log4j2)

Posted by "JWT007 (via GitHub)" <gi...@apache.org>.
JWT007 commented on issue #3215:
URL: https://github.com/apache/logging-log4j2/issues/3215#issuecomment-2652279477

   @ppkarwasz - another small PR - simple fix
   
   @jaykataria1111 - sorry to steal this one from you :( - its been a month and I am trying to close out some of the tickets I created before the next release.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] RegexReplacement static factory method doesn't handle null 'replacement' attribute correctly (logging-log4j2)

Posted by "jaykataria1111 (via GitHub)" <gi...@apache.org>.
jaykataria1111 commented on issue #3215:
URL: https://github.com/apache/logging-log4j2/issues/3215#issuecomment-2594612556

   I can work on this @ppkarwasz feel free too assign this to me :) 


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] RegexReplacement static factory method doesn't handle null 'replacement' attribute correctly [logging-log4j2]

Posted by "ramanathan1504 (via GitHub) via notifications" <no...@logging.apache.org>.
ramanathan1504 closed issue #3215: RegexReplacement static factory method doesn't handle null 'replacement' attribute correctly
URL: https://github.com/apache/logging-log4j2/issues/3215


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org