Skip to content

Modernization: Upgrade to Java 17, Spring 6, and Jakarta EE Ecosystem#60

Open
mcarbonneaux wants to merge 1 commit into
coova:masterfrom
mcarbonneaux:jdk17+jakarta
Open

Modernization: Upgrade to Java 17, Spring 6, and Jakarta EE Ecosystem#60
mcarbonneaux wants to merge 1 commit into
coova:masterfrom
mcarbonneaux:jdk17+jakarta

Conversation

@mcarbonneaux
Copy link
Copy Markdown

Description

This Pull Request represents a comprehensive modernization of JRadius, transitioning the codebase from legacy Java 5/6 and outdated dependencies (Spring 3.x, Log4j 1.2) to Java 17 and the Spring 6 / Jakarta EE 9+ ecosystem.

The goal of this update is to ensure JRadius remains compatible with modern JVMs, improves type safety, and resolves critical security concerns associated with end-of-life libraries.


Key Changes

1. Java 17 Migration

  • Compiler Baseline: Updated maven.compiler.release, source, and target to 17.
  • Generics & Type Safety: Refactored the codebase to eliminate raw types. Internal components like ObjectPool<FreeRadiusRequest> now utilize the diamond operator and proper generics.
  • API Modernization: * Migrated deprecated reflection calls (e.g., clazz.newInstance()) to clazz.getDeclaredConstructor().newInstance().
    • Replaced deprecated constructors (e.g., new Integer()) with Integer.valueOf().
    • Updated DataInputStream.readLine() usage to BufferedReader for better character encoding handling.

2. Spring 6 & Jakarta Transition

  • Framework Upgrade: Upgraded Spring Framework from 3.0.x to 6.1.5.
  • Jakarta EE Compliance: In alignment with Spring 6, the project now supports the Jakarta EE 9+ namespace. While standard JDK javax.* packages (Swing/SSL) remain, the core framework is now ready for modern Jakarta-based deployments.

3. Modern Logging Stack

  • Log4j 2 Migration: Replaced the EOL Log4j 1.2.15 with Log4j 2.23.1.
  • SLF4J Integration: Updated SLF4J to 2.0.12, utilizing log4j-slf4j2-impl for modern logging abstraction.
  • Configuration: Migrated legacy log4j.properties to a structured log4j2.xml.

4. Enhanced Testing & Build

  • JUnit 5: Full migration from JUnit 4 to JUnit Jupiter (5.10.2).
  • Maven Improvements: * Implemented ${revision} properties for consistent versioning across all modules.
    • Replaced insecure HTTP repositories (OpenNMS) with Maven Central via HTTPS.
    • Refined .gitignore and consolidated project documentation into a primary README.md.

Impact

This upgrade resolves long-standing deprecation warnings and significantly improves the developer experience. By moving to Java 17 and Spring 6, JRadius can now benefit from modern performance optimizations, better security patches, and compatibility with contemporary containerized environments.

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