Skip to content

refactor: fix verbose env var bug and simplify codebase#65

Closed
KyleCB wants to merge 1 commit into
mainfrom
refactor/simplify-and-fix-code-quality
Closed

refactor: fix verbose env var bug and simplify codebase#65
KyleCB wants to merge 1 commit into
mainfrom
refactor/simplify-and-fix-code-quality

Conversation

@KyleCB

@KyleCB KyleCB commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix a bug where NewVerbose() reads BPL_JAVA_NMT_ENABLED instead of BP_LOG_LEVEL, making verbose mode non-functional via env var. Also includes several cleanups found during review.

Use Cases

  • Setting BP_LOG_LEVEL=DEBUG now correctly enables verbose output as documented
  • JVMCacerts.Contribute() no longer has a TOCTOU race between existence check and env var assignment
  • BuildJavaToolOptions() correctly deduplicates options by token instead of substring, preventing false positives
  • SpringOptimizer.Execute() no longer allocates an unnecessary map and slice to dispatch a single helper
  • buildHelpers() in Calculator skips constructing OpenSSLCertificateLoader and NMT when their respective flags are disabled, rather than building them and immediately deleting them from the map

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Co-authored-by: Claude Sonnet 4.6 <no-reply@softleader.com.tw>
@KyleCB KyleCB closed this Apr 14, 2026
@KyleCB KyleCB deleted the refactor/simplify-and-fix-code-quality branch April 14, 2026 10:53
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.

1 participant