You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
The text was updated successfully, but these errors were encountered:
RegexReplacement#createRegexReplacement
Static builder method returns
null
if theregex
attribute is null, but although it logs an error it does not returnnull
if thereplacement
attribute isnull
.The text was updated successfully, but these errors were encountered: