Commit a73e166
Migrate from Java 11 to Java 21 LTS with dependency updates and Docker optimization
This migration upgrades the project to Java 21 LTS while maintaining backward compatibility with the jDisco library (Java 6). The primary motivation was to resolve deprecated Observable/Observer APIs that were blocking future Java version upgrades.
Key changes:
**API Modernization:**
- Replace deprecated java.util.Observable/Observer with PropertyChangeSupport
- Add ContextChangeListener interface extending PropertyChangeListener
- Refactor DefaultContext, StatusBar, RailwayNetGridCanvas to use new pattern
- Add 6 PropertyChangeTest unit tests (242 tests total, all passing)
**Dependency Updates:**
- Java: 11 → 21 LTS
- JUnit: 5.10.1 → 5.11.4
- AssertJ: 3.24.2 → 3.27.6 (required for Java 21)
- Mockito: 5.7.0 → 5.21.0
- SLF4J: 2.0.9 → 2.0.17
- Logback: 1.4.11 → 1.5.23
- Gradle: 8.5 → 8.12
- Shadow Plugin: 8.1.1 → 8.3.8 (plugin ID changed to com.gradleup.shadow)
**Docker Optimization:**
- Replace Debian Buster + manual Java install with Eclipse Temurin official images
- Use eclipse-temurin:21-jdk for builder stage
- Use eclipse-temurin:21-jre for runtime stage
- Simplify Dockerfile, improve maintainability
**CI/CD Updates:**
- Rename .github/workflows/ant-java11.yml → gradle-java21.yml
- Update JAVA_VERSION environment variable to '21'
- Update build badges and references
**Documentation:**
- Update CLAUDE.md with Java 21 requirements and dependencies
- Update README.md with current build system and Docker setup
- Add JAVA21-MIGRATION-SUMMARY.md with comprehensive migration details
All 242 tests pass with Java 21 (236 existing + 6 new PropertyChange tests).
Docker build and runtime verified successfully.
GUI functionality confirmed working with X11 forwarding.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent cf91c0c commit a73e166
19 files changed
Lines changed: 1050 additions & 275 deletions
File tree
- .github/workflows
- gradle/wrapper
- src
- main/java/cz/vutbr/fit/interlockSim
- context
- gui
- test/java/cz/vutbr/fit/interlockSim
- context
- testutil
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | | - | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
191 | 195 | | |
192 | 196 | | |
193 | 197 | | |
194 | | - | |
| 198 | + | |
195 | 199 | | |
196 | | - | |
197 | | - | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | | - | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| |||
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
353 | | - | |
| 357 | + | |
354 | 358 | | |
355 | 359 | | |
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
360 | | - | |
| 364 | + | |
361 | 365 | | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
365 | | - | |
| 369 | + | |
366 | 370 | | |
367 | 371 | | |
368 | 372 | | |
| |||
554 | 558 | | |
555 | 559 | | |
556 | 560 | | |
557 | | - | |
| 561 | + | |
558 | 562 | | |
559 | 563 | | |
560 | 564 | | |
561 | | - | |
| 565 | + | |
562 | 566 | | |
563 | 567 | | |
564 | 568 | | |
565 | 569 | | |
566 | | - | |
| 570 | + | |
567 | 571 | | |
568 | 572 | | |
569 | 573 | | |
| |||
572 | 576 | | |
573 | 577 | | |
574 | 578 | | |
575 | | - | |
| 579 | + | |
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 30 | + | |
43 | 31 | | |
44 | 32 | | |
45 | 33 | | |
| |||
82 | 70 | | |
83 | 71 | | |
84 | 72 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 73 | + | |
91 | 74 | | |
92 | | - | |
| 75 | + | |
| 76 | + | |
93 | 77 | | |
94 | | - | |
95 | 78 | | |
96 | 79 | | |
97 | 80 | | |
98 | 81 | | |
99 | 82 | | |
100 | 83 | | |
101 | 84 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 85 | + | |
107 | 86 | | |
108 | 87 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 88 | | |
114 | 89 | | |
115 | 90 | | |
| |||
0 commit comments