-
- Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
RegexReplacement#createRegexReplacement
Static builder method returns nullif the regexattribute 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); } ppkarwasz
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
To triage