Skip to content

Decouple CLI optionality from runtime JetBrains annotation fork #616

Closed

Description

@bbottema

Context

Issue #610 reports a Dependency-Check finding for com.github.bbottema:jetbrains-runtime-annotations:1.0.2 being mapped to JetBrains Runtime / CVE-2025-29903. The artifact used here is not JetBrains Runtime; it is a republished copy of JetBrains @NotNull / @Nullable with RUNTIME retention so the CLI generator can inspect @Nullable through reflection.

That design made the CLI clever but brittle: Java/API nullability and CLI argument optionality are currently coupled through the same annotation.

Goal

Separate those meanings explicitly:

  • Keep official org.jetbrains:annotations for API nullability and standard IDE/static-analysis tooling.
  • Remove com.github.bbottema:jetbrains-runtime-annotations from Simple Java Mail.
  • Add explicit runtime-retained CLI metadata, probably @Cli.Optional or @Cli.OptionalParameter, for builder parameters that are optional in the CLI.
  • Update CLI generation and command-line consumption to inspect that CLI annotation instead of org.jetbrains.annotations.Nullable.
  • Preserve Java 8 compatibility.
  • Document the builder/Javadoc/reflection/serialized-metadata CLI mechanism in PROJECT_MECHANISMS_CATALOGUE.md, including why the organization is brittle and how future API changes should keep CLI parity.

Notes

This should address the practical scanner/tooling concern from #610 without renaming the runtime fork or continuing to depend on the fork in Simple Java Mail.

Activity

  1. added this to the 8.13.0 milestone on Jul 3, 2026
  2. bbottema commented on Jul 3, 2026

    @bbottema
    OwnerAuthor

    Implemented by decoupling CLI optionality from Java nullability:

    • Removed the com.github.bbottema:jetbrains-runtime-annotations dependency from Simple Java Mail.
    • Kept official org.jetbrains:annotations for API nullability and tooling compatibility.
    • Added runtime-retained @Cli.Optional for CLI-reflected builder parameters.
    • Updated CLI option declaration and command-line consumption to use @Cli.Optional instead of reflective @Nullable.
    • Added CLI coverage for both option metadata and runtime parsing with omitted/provided optional arguments.
    • Documented the CLI/Javadoc/reflection mechanism and API expansion expectations in the project catalogue/workflow docs.

    This resolves the scanner/tooling problem raised in #610 without keeping the runtime annotation fork in the dependency graph.

  3. bbottema commented on Jul 8, 2026

    @bbottema
    OwnerAuthor

    Released in Simple Java Mail v9.0.0, which is now available from Maven Central:

    https://repo1.maven.org/maven2/org/simplejavamail/simple-java-mail/9.0.0/

    Release notes:
    https://github.com/bbottema/simple-java-mail/releases/tag/9.0.0

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions