Skip to content

Remove duplicate sanitizeForLog helper from WolfSSLDebug - #414

Open
cconlon wants to merge 2 commits into
wolfSSL:masterfrom
cconlon:logFix
Open

Remove duplicate sanitizeForLog helper from WolfSSLDebug#414
cconlon wants to merge 2 commits into
wolfSSL:masterfrom
cconlon:logFix

Conversation

@cconlon

@cconlon cconlon commented Sep 8, 2026

Copy link
Copy Markdown
Member

This PR fixes the master build. WolfSSLDebug.java defines LOG_UNSAFE_CHARS and sanitizeForLog() twice, added separately by PR #404 and PR #406 at different points in the file, so the merge did not conflict but javac fails with "already defined".

@cconlon cconlon self-assigned this Sep 8, 2026
Copilot AI lite review requested due to automatic review settings September 8, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

It resolves a confirmed duplicate-definition compile error by removing one copy while leaving the intended sanitizer implementation intact.

Pull request overview

Removes a duplicate LOG_UNSAFE_CHARS / sanitizeForLog() definition in WolfSSLDebug.java that caused javac to fail with “already defined”, restoring master buildability while keeping the more complete sanitizer variant (including backslash for JSON safety).

Changes:

  • Deletes the earlier duplicate LOG_UNSAFE_CHARS Pattern and sanitizeForLog() helper block.
  • Retains the later sanitizer implementation that also sanitizes backslash (\) in addition to control chars and ".
File summaries
File Description
src/java/com/wolfssl/WolfSSLDebug.java Removes the duplicate log-sanitization helper to fix compilation; keeps the JSON-safer implementation.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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