Skip to content

Use StringBuilder in PhoneFormatterImpl - #5

Open
drdavella wants to merge 1 commit into
develop-7.0.xfrom
cleanup/phone-formatter-stringbuilder
Open

Use StringBuilder in PhoneFormatterImpl#5
drdavella wants to merge 1 commit into
develop-7.0.xfrom
cleanup/phone-formatter-stringbuilder

Conversation

@drdavella

Copy link
Copy Markdown

Summary

  • Replace StringBuffer with StringBuilder for the local newNumber variable in formatTelephoneNumber.
  • The variable never escapes the method, so the synchronized StringBuffer overhead isn't buying anything.

Pure cleanup, no behavior change.

Test plan

  • mvn -pl core/broadleaf-profile-web -am compile
  • Existing phone-format tests still pass

🤖 Generated with Claude Code

newNumber is a local variable, so the synchronized StringBuffer
overhead isn't buying anything. Switch to StringBuilder.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@clevernyyyy

Copy link
Copy Markdown

Logo
Checkmarx One – Scan Summary & Detailsd90cbdb9-622e-4b45-a62b-e80f84724c12


New Issues (1)

Medium: 1

Checkmarx found the following issues in this Pull Request

# Severity Issue Source File / Package Checkmarx Insight
1 MEDIUM CVE-2026-19880 Maven-ch.qos.logback:logback-classic-1.5.32
detailsDescription: Path-traversal vulnerability in QOS.CH Sarl Logback-classic on Java (logback-classic module) allows path-traversal vulnerability. More specifically...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: A0dC00MnByqJ8Noe3dRUoBzl0H%2FevBmzfr7vGZ79zvU%3D
Vulnerable Package

Communicate with Checkmarx by submitting a PR comment with @Checkmarx followed by one of the supported commands. Learn about the supported commands here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants