Skip to content

JDK 25 refresh: declare the Java version, build it, and prove it - #1

Merged
KI7MT merged 3 commits into
masterfrom
watson/jdk-25-refresh
Oct 4, 2026
Merged

KI7MT merged 3 commits into
masterfrom
watson/jdk-25-refresh

Conversation

@watson-ki7mt

@watson-ki7mt watson-ki7mt Bot commented Oct 4, 2026

Copy link
Copy Markdown

No source file is touched. The examples compile unchanged on JDK 25 — written against Java 8 in 2017, clean today with zero errors. What had rotted was everything around them.

What was actually wrong

The README told readers to install Java 8 Update 151 — October 2017. For a repo aimed at students that's the line that matters, because a beginner installs exactly what the README says. That was the whole security story here: no third-party dependencies, no network or file I/O, no deserialization, nothing for a CVE to attach to. Just an instruction to install an eight-year-old JDK.

There was no build file, so the Java version was whatever JDK happened to be installed.

39 of 53 files are CRLF from the original Windows authoring, with no .gitattributes declaring intent — whole-file diffs for anyone on Linux or macOS.

What this adds

pom.xml + two module poms Java version declared once; a future release is a one-line change, not 47 edits
.github/workflows/build.yml Linux, Windows, macOS — on push, PR, and monthly
.gitattributes line endings, going forward
README JDK 25 LTS, plus command-line build and run instructions

Sources stay in src/ rather than moving to src/main/java — the layout is part of what the examples teach, and moving 38 files would bury the change.

The monthly cron matters more than it looks: it's what makes the next incompatibility show up as a red build rather than a discovery in 2034.

Verified, not assumed

mvn clean compile          # JDK 25.0.4.1, exit 0, 43 classes (27 console + 16 GUI)
javac --release 25         # exit 0, 10 lint warnings, no errors

And the commands the README now documents were run as written:

java -cp ConsoleApps/target/classes beam.example.radio.station.RadioStationDriver
  Station Call ....: KI7MT
  Operator ........: Greg Beam, KI7MT

Left alone deliberately

  • The code, including style, Javadoc headers and Allman braces.
  • 10 lint warnings — [serial] and [this-escape] in the two Swing frames. Cosmetic, and this-escape is arguably a teaching point rather than a defect. Happy to address separately if wanted.
  • Existing line endings — .gitattributes fixes intent without rewriting every line of blame. A git add --renormalize . would clean them in one commit if you'd rather.
  • Eclipse/IntelliJ project files — still work; .idea/workspace.xml is per-user state that could come out of version control separately.

🤖 Generated with Claude Code

KI7MT and others added 3 commits October 4, 2026 03:03
The examples still compile unchanged — written against Java 8 in 2017, clean on JDK 25 today with
no errors. What had rotted was everything around them.

The README told readers to install Java 8 Update 151, which is from October 2017. For a repository
aimed at students that is the one line that matters: a beginner installs exactly what the README
says. It now names JDK 25 LTS.

There was no build file, so the Java version was whatever JDK happened to be installed. A Maven
build declares it once, in the root pom, and both modules inherit it — moving to a future release
is a one-line change rather than an edit per project. Sources stay in src/ rather than being moved
to src/main/java: the layout is part of what the examples teach.

CI builds on Linux, Windows and macOS, on push and monthly, so the next incompatibility surfaces as
a red build instead of a discovery years later.

A .gitattributes normalises line endings. Thirty-nine of fifty-three files are CRLF from the
original Windows authoring, with nothing declaring intent, so they show up as whole-file diffs on
Linux and macOS. Existing files are left as they are; this fixes it going forward without rewriting
every line of history.

No source file is touched. Verified with mvn clean compile on JDK 25.0.4.1 (exit 0, 43 classes) and
by running the commands the README now documents.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tate

Line endings only: no source line changes. Thirty-nine files were CRLF from the original 2017
Windows authoring, so every one of them showed as a whole-file diff to anyone on Linux or macOS.
With `* text=auto` now in .gitattributes, any file a contributor touches would normalise on commit
anyway — doing it piecemeal would leave the repository half converted, which is worse than either
end state. So it is done once, here, and never again.

Verifiable as content-free: `git diff -w` across the staged change is empty, and every file has
equal insertion and deletion counts.

.idea/workspace.xml is also untracked. It holds one person's window layout, open tabs and local
paths. The other .idea files — misc.xml, modules.xml, uiDesigner.xml, vcs.xml — are shared project
configuration and stay.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Seven lines, both Swing frames, no behaviour change. 10 warnings down to 3.

`final` on FireFighterCostGUI and ButtonFrame removes [this-escape]. The warning fires because the
constructors call overridable methods — setLayout, setResizable — before a subclass would finish
initialising. Nothing extends either class, and neither is meant to be extended: they are the
application's own windows. Saying so in the declaration is both the fix and the accurate statement.

`transient` on the five fields removes [serial]. JFrame is Serializable, so every subclass inherits
the contract whether or not anyone intends to serialise it, and these fields hold types that are
not. They are working state, never part of a persisted form, and transient says exactly that.

The remaining three are [dangling-doc-comments], in files whose Javadoc header sits above the
imports rather than against the class. That is the repository's comment style, and the style is
deliberate, so they stay. A student seeing three explained warnings learns more than one seeing ten
unexplained ones.

Verified: javac --release 25 -Xlint:all, exit 0. mvn clean compile, 43 classes. Examples still run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@watson-ki7mt

watson-ki7mt Bot commented Oct 4, 2026

Copy link
Copy Markdown
Author

Took option A, plus the two cleanups. Three commits now, each one reviewable on its own.

fe572ac — the refresh: Maven, CI, README, .gitattributes. No source touched.

0e227d1 — line endings, content-free and provable. 39 files were CRLF from the 2017 Windows authoring. git diff -w across the change is empty and every file has equal insertion/deletion counts. Also untracks .idea/workspace.xml (one person's window layout and local paths); misc.xml, modules.xml, uiDesigner.xml and vcs.xml stay, since those are shared project config.

Doing this piecemeal wasn't an option: with text=auto in place, any file anyone edits normalises on commit, so the choice was once-and-done or a permanently half-converted repo. I hit it immediately — the first warning fix came out as a 31 KB whole-file diff, which is why the ordering is renormalise first, then edit.

e7ca239 — warnings, 7 lines across the two Swing frames:

Fix Removes Why it's honest, not a silencer
final on FireFighterCostGUI, ButtonFrame [this-escape] Constructors call setLayout/setResizable before a subclass would finish initialising. Nothing extends either, and neither is meant to be — they're the app's own windows
transient on 5 fields [serial] JFrame is Serializable, so subclasses inherit the contract regardless of intent. These hold non-serializable working state that was never part of a persisted form

10 warnings → 3. The remaining three are [dangling-doc-comments], in files whose Javadoc header sits above the imports rather than against the class. That's the repository's comment style and it's deliberate, so they stay — three explained warnings teach a student more than ten unexplained ones.

Verified after every commit: javac --release 25 -Xlint:all exit 0, mvn clean compile 43 classes, and the examples still run.

@KI7MT
KI7MT merged commit 214531d into master Oct 4, 2026
3 checks passed
@KI7MT
KI7MT deleted the watson/jdk-25-refresh branch October 4, 2026 09:12
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