Fachlicher Codevergleich
Vollständige Gegenüberstellung des Legacy- und Modern-Verhaltens, der strukturellen Änderung und der relevanten Migrationsrisiken.
| Nr. | Modul | Legacy | Modern | Risiko | Einstufung |
|---|---|---|---|---|---|
| 01 | Dependency Injection | manual registry/service lookup | constructor injection with explicit ports | hidden dependencies, global state | NIEDRIG |
| 02 | AOP | dynamic proxy around target | annotation-driven Spring aspect | proxy limitations and cross-cutting coupling | NIEDRIG |
| 03 | REST | JAX-RS resource with in-memory repository | Spring MVC controller + service + repository | HTTP contract drift and validation gaps | NIEDRIG |
| 04 | Persistenz | manual JDBC DAO | Spring Data JPA repository + service | schema drift, lazy loading and transaction boundaries | NIEDRIG |
| 05 | Transaktionen | manual JDBC commit/rollback | declarative @Transactional service | partial writes and incorrect rollback rules | NIEDRIG |
| 06 | Batch | custom CSV loop/importer | Spring Batch job/step configuration | restartability, duplicate processing and bad-record policy | MITTEL |
| 07 | Messaging | embedded ActiveMQ Classic/JMS gateway | Spring JMS/Artemis publisher + listener | duplicate delivery, poison messages and vulnerable legacy broker | MITTEL |
| 08 | XML und JAXB | javax JAXB model/mapper | Jakarta JAXB model/mapper | namespace and schema compatibility | NIEDRIG |
| 09 | Servlet und Web | embedded Jetty servlet | Spring MVC controller | container/API migration and endpoint compatibility | NIEDRIG |
| 10 | SOAP | javax JAX-WS endpoint | Jakarta JAX-WS endpoint | WSDL/namespace compatibility and fault mapping | MITTEL |
| 11 | Java-Grundlagen | mutable JavaBean | record/enum-oriented value model | serialization/equality behavior changes | NIEDRIG |
| 12 | Collections | mutable collection wrapper | defensive/snapshot-oriented collection API | mutation leaks and ordering semantics | NIEDRIG |
| 13 | Generics | raw container | typed generic container/repository | runtime ClassCastException versus compile-time safety | NIEDRIG |
| 14 | Annotations und Reflection | manual reflection registry | annotation-driven command discovery | illegal access, duplicate commands and startup failures | NIEDRIG |
| 15 | Lambda und Streams | imperative loops/accumulator | stream pipeline | ordering, short-circuit and null semantics | NIEDRIG |
| 16 | Concurrency | manual thread/executor coordination | structured executor/future usage | race conditions, leaks and nondeterministic tests | NIEDRIG |
| 17 | Java I/O und NIO | stream-based file copy | NIO Path/Files service | resource handling, overwrite and atomicity | NIEDRIG |
| 18 | Exception Handling und Logging | catch-and-swallow behavior | exception translation with logging | lost root cause and unstable error contracts | NIEDRIG |
| 19 | JUnit und Testdesign | JUnit 4 style | JUnit Jupiter/parameterized tests | test lifecycle and assertion migration | NIEDRIG |
| 20 | HTTP-Client und Webtest | basic URL connection/testing | Java HttpClient with local HTTP server | timeouts, redirects and encoding | NIEDRIG |
| 21 | Maven Properties und Konfiguration | manual properties loading | typed configuration/value object | missing keys, precedence and environment drift | NIEDRIG |
| 22 | Spring JDBC | manual JDBC DAO | JdbcTemplate repository | SQL mapping, transaction and resource handling | NIEDRIG |
| 23 | Hibernate und JPA | native Hibernate 5 session/unit of work | Spring Data JPA | entity lifecycle, schema and query differences | NIEDRIG |
| 24 | MongoDB | driver/BSON mapper repository | Spring Data Mongo repository | document shape and mapping compatibility | NIEDRIG |
| 25 | JNDI und Service-Auflösung | service locator/JNDI lookup | constructor injection | runtime lookup failure and hidden dependency | NIEDRIG |
| 26 | JMX und Monitoring | manual MBean registration | Spring Boot Actuator | metric/endpoint naming and exposure | NIEDRIG |
| 27 | EJB und Services | EJB-style service boundary | Spring service/controller boundary | transaction/security semantics and remote contract drift | NIEDRIG |
| 28 | JPMS / Jigsaw | classpath-only modules | explicit module descriptors | split packages, exports and readability | MITTEL |
| 29 | Service Registry und ServiceLoader | custom service registry | Java ServiceLoader | provider discovery, ordering and duplicates | NIEDRIG |
| 30 | XML Parser | basic parser configuration | secure parser facade | XXE, entity expansion and malformed XML | NIEDRIG |
| 31 | XSLT | new transformer per call/basic factory | secure cached Templates/flyweight | external access, thread safety and cache invalidation | NIEDRIG |
| 32 | Kryptografie | AES/ECB legacy example | AES/GCM service with authenticated payload | confidentiality/integrity failure and nonce misuse | NIEDRIG |
| 33 | SMTP und Mail | javax.mail message factory | Jakarta Mail gateway | header injection, transport errors and charset drift | NIEDRIG |
| 34 | Patterns und Refactoring | conditional pricing calculator | Strategy + Factory + Service | branch growth and unsupported customer types | NIEDRIG |
Bewertungsgrenzen
- Struktur- und API-Vergleiche beruhen auf dem vollständigen lokalen Quellbestand.
- Testzuordnung ist statisch und ersetzt keine JaCoCo-Line-Coverage.
- Der Maven-Build wurde versucht; Maven Central war in der isolierten Laufzeit per DNS nicht erreichbar. Java-21-Syntax und JDK-only-Teilkompilierung wurden separat geprüft.