Optimize whitespace checks in StringUtils
#31067
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
On review,
StringUtils
has 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 theStringBuilder
itself.The text was updated successfully, but these errors were encountered: