Deprecate StringUtils::trimWhitespace and variants
This commits deprecates - StringUtils::trimWhitespace in favor of String::strip - StringUtils::trimLeadingWhitespace in favor of String::stripLeading - StringUtils::trimTrailingWhitespace in favor of String::stripTrailing Closes gh-27769
This commit is contained in:
@@ -145,14 +145,14 @@ class TxAdviceBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
|
||||
private void addRollbackRuleAttributesTo(List<RollbackRuleAttribute> rollbackRules, String rollbackForValue) {
|
||||
String[] exceptionTypeNames = StringUtils.commaDelimitedListToStringArray(rollbackForValue);
|
||||
for (String typeName : exceptionTypeNames) {
|
||||
rollbackRules.add(new RollbackRuleAttribute(StringUtils.trimWhitespace(typeName)));
|
||||
rollbackRules.add(new RollbackRuleAttribute(typeName.strip()));
|
||||
}
|
||||
}
|
||||
|
||||
private void addNoRollbackRuleAttributesTo(List<RollbackRuleAttribute> rollbackRules, String noRollbackForValue) {
|
||||
String[] exceptionTypeNames = StringUtils.commaDelimitedListToStringArray(noRollbackForValue);
|
||||
for (String typeName : exceptionTypeNames) {
|
||||
rollbackRules.add(new NoRollbackRuleAttribute(StringUtils.trimWhitespace(typeName)));
|
||||
rollbackRules.add(new NoRollbackRuleAttribute(typeName.strip()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class TransactionAttributeEditor extends PropertyEditorSupport {
|
||||
RuleBasedTransactionAttribute attr = new RuleBasedTransactionAttribute();
|
||||
for (String token : tokens) {
|
||||
// Trim leading and trailing whitespace.
|
||||
String trimmedToken = StringUtils.trimWhitespace(token.trim());
|
||||
String trimmedToken = token.strip();
|
||||
// Check whether token contains illegal whitespace within text.
|
||||
if (StringUtils.containsWhitespace(trimmedToken)) {
|
||||
throw new IllegalArgumentException(
|
||||
|
||||
Reference in New Issue
Block a user