Skip to content

Tidy up: name companion source file after the generated class (Jtd2Jar.java) #189

Open

Description

@simbo1905

Sub-issue 10 of 26 from the 2026-11-21 bot-review-comment audit. Parent issue: #179 (Bot review comment tidy up).
Audited origin/main HEAD: 2e5cf37. Audit date: 2026-11-21.

== Finding 10 (verbatim from the audit findings file) ==

  1. PR Add offline jdt2jar CLI and distroless packaging #148 — --include-sources derives the companion source filename from the JAR name.
    Author: chatgpt-codex-connector[bot], 2026-05-20. Comment: Add offline jdt2jar CLI and distroless packaging #148 (comment)
    Source: jdt2jar/src/main/java/json/java21/jdt2jar/Jdt2Jar.java:232. Current: jtd2jar/src/main/java/json/java21/jtd2jar/Jtd2Jar.java:230-235 (sourcePathFor still uses output.getFileName() + ".java").
    Flagged: "the emitted source is not directly compilable: javac fails with 'public class ... should be declared in a file named ...' whenever --class differs from the output JAR basename".
    Still applies: sourcePathFor still names the file after the JAR/module output name, not the generated public class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions