Consistently declare ignoreUnresolvablePlaceholders as last argument
This commit is contained in:
@@ -248,7 +248,7 @@ public abstract class AbstractPropertyResolver implements ConfigurablePropertyRe
|
||||
|
||||
private PropertyPlaceholderHelper createPlaceholderHelper(boolean ignoreUnresolvablePlaceholders) {
|
||||
return new PropertyPlaceholderHelper(this.placeholderPrefix, this.placeholderSuffix,
|
||||
this.valueSeparator, ignoreUnresolvablePlaceholders, this.escapeCharacter);
|
||||
this.valueSeparator, this.escapeCharacter, ignoreUnresolvablePlaceholders);
|
||||
}
|
||||
|
||||
private String doResolvePlaceholders(String text, PropertyPlaceholderHelper helper) {
|
||||
|
||||
@@ -89,15 +89,15 @@ final class PlaceholderParser {
|
||||
* Create an instance using the specified input for the parser.
|
||||
* @param prefix the prefix that denotes the start of a placeholder
|
||||
* @param suffix the suffix that denotes the end of a placeholder
|
||||
* @param ignoreUnresolvablePlaceholders whether unresolvable placeholders
|
||||
* should be ignored ({@code true}) or cause an exception ({@code false})
|
||||
* @param separator the separating character between the placeholder
|
||||
* variable and the associated default value, if any
|
||||
* @param escape the character to use at the beginning of a placeholder
|
||||
* prefix or separator to escape it and render it as is
|
||||
* @param ignoreUnresolvablePlaceholders whether unresolvable placeholders
|
||||
* should be ignored ({@code true}) or cause an exception ({@code false})
|
||||
*/
|
||||
PlaceholderParser(String prefix, String suffix, boolean ignoreUnresolvablePlaceholders,
|
||||
@Nullable String separator, @Nullable Character escape) {
|
||||
PlaceholderParser(String prefix, String suffix, @Nullable String separator,
|
||||
@Nullable Character escape, boolean ignoreUnresolvablePlaceholders) {
|
||||
this.prefix = prefix;
|
||||
this.suffix = suffix;
|
||||
String simplePrefixForSuffix = wellKnownSimplePrefixes.get(this.suffix);
|
||||
|
||||
@@ -46,7 +46,7 @@ public class PropertyPlaceholderHelper {
|
||||
* @param placeholderSuffix the suffix that denotes the end of a placeholder
|
||||
*/
|
||||
public PropertyPlaceholderHelper(String placeholderPrefix, String placeholderSuffix) {
|
||||
this(placeholderPrefix, placeholderSuffix, null, true, null);
|
||||
this(placeholderPrefix, placeholderSuffix, null, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ public class PropertyPlaceholderHelper {
|
||||
public PropertyPlaceholderHelper(String placeholderPrefix, String placeholderSuffix,
|
||||
@Nullable String valueSeparator, boolean ignoreUnresolvablePlaceholders) {
|
||||
|
||||
this(placeholderPrefix, placeholderSuffix, valueSeparator, ignoreUnresolvablePlaceholders, null);
|
||||
this(placeholderPrefix, placeholderSuffix, valueSeparator, null, ignoreUnresolvablePlaceholders);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,20 +73,20 @@ public class PropertyPlaceholderHelper {
|
||||
* @param placeholderSuffix the suffix that denotes the end of a placeholder
|
||||
* @param valueSeparator the separating character between the placeholder variable
|
||||
* and the associated default value, if any
|
||||
* @param ignoreUnresolvablePlaceholders indicates whether unresolvable placeholders should
|
||||
* be ignored ({@code true}) or cause an exception ({@code false})
|
||||
* @param escapeCharacter the escape character to use to ignore placeholder prefix
|
||||
* or value separator, if any
|
||||
* @param ignoreUnresolvablePlaceholders indicates whether unresolvable placeholders should
|
||||
* be ignored ({@code true}) or cause an exception ({@code false})
|
||||
* @since 6.2
|
||||
*/
|
||||
public PropertyPlaceholderHelper(String placeholderPrefix, String placeholderSuffix,
|
||||
@Nullable String valueSeparator, boolean ignoreUnresolvablePlaceholders,
|
||||
@Nullable Character escapeCharacter) {
|
||||
@Nullable String valueSeparator, @Nullable Character escapeCharacter,
|
||||
boolean ignoreUnresolvablePlaceholders) {
|
||||
|
||||
Assert.notNull(placeholderPrefix, "'placeholderPrefix' must not be null");
|
||||
Assert.notNull(placeholderSuffix, "'placeholderSuffix' must not be null");
|
||||
this.parser = new PlaceholderParser(placeholderPrefix, placeholderSuffix,
|
||||
ignoreUnresolvablePlaceholders, valueSeparator, escapeCharacter);
|
||||
valueSeparator, escapeCharacter, ignoreUnresolvablePlaceholders);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,11 +50,11 @@ public abstract class SystemPropertyUtils {
|
||||
|
||||
private static final PropertyPlaceholderHelper strictHelper =
|
||||
new PropertyPlaceholderHelper(PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, VALUE_SEPARATOR,
|
||||
false, ESCAPE_CHARACTER);
|
||||
ESCAPE_CHARACTER, false);
|
||||
|
||||
private static final PropertyPlaceholderHelper nonStrictHelper =
|
||||
new PropertyPlaceholderHelper(PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, VALUE_SEPARATOR,
|
||||
true, ESCAPE_CHARACTER);
|
||||
ESCAPE_CHARACTER, true);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user