-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Optimize whitespace checks in StringUtils #31067
Copy link
Copy link
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement
Milestone
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement
Type
Fields
Give feedbackNo fields configured for issues without a type.
On review,
StringUtilshas some suboptimal whitespace checks: ForhasText(String), it can use the JDK 11+String.isBlank()method, and intrimAllWhitespace(CharSequence), it unnecessarily returnsStringBuilder.toString()instead of just theStringBuilderitself.