Skip to content

feat(java): modernize POM and resolve Java 17 compatibility (BREAKING) - #5

Merged
szkiba merged 3 commits into
mainfrom
refactor-modernize-pom
Jan 28, 2026
Merged

szkiba merged 3 commits into
mainfrom
refactor-modernize-pom

Conversation

@szkiba

@szkiba szkiba commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

This PR completes the Modernize POM task from Phase 2 of the v0.6.0 roadmap (#1), updating the project to Java 17 and resolving all compatibility issues.

POM Modernization

  • ✅ Update compiler source/target to Java 17 using maven.compiler.release
  • ✅ Remove legacy SVN metadata and wagon plugins
  • ✅ Update Maven plugins to latest stable versions

Detailed Changes

Version & Build:

  • Update version to 0.6.0-SNAPSHOT
  • Set compiler target to Java 17 using maven.compiler.release
  • Add UTF-8 source encoding property

Migration:

  • Migrate SCM from SourceForge SVN to GitHub Git
  • Update project URL from ini4j.org to github.com/ini4j/ini4j
  • Remove legacy SourceForge distribution management configuration
  • Remove SourceForge issue management configuration
  • Update developer info (timezone, email)

Dependencies:

  • Update JUnit from 4.5 to 4.13.2
  • Update EasyMock from 2.3 to 5.2.0
  • Remove easymockclassextension dependency (merged into EasyMock 3.2+)
  • Remove retrotranslator-runtime dependency (Java 5 backward compatibility)

Build Configuration:

  • Remove Windows-specific Maven profile
  • Remove release-candidate profile with checkstyle/PMD configuration
  • Clean up legacy build configuration and plugins

Java 17 Compatibility Fixes

  • Replace deprecated Class.newInstance() with getDeclaredConstructor().newInstance()
  • Replace deprecated wrapper constructors (Character, Double, Float) with valueOf()
  • Fix Proxy.newProxyInstance() classloader to handle null context classloader
  • Fix BasicProfile transform method to correctly handle prefix with propertyFirstUpper

Breaking Changes

⚠️ BREAKING CHANGE: Renamed Profile.remove(sectionName, optionName) to removeOption() to avoid conflict with Map.remove() in Java 17+.

Migration:

// Before
profile.remove(section, option)

// After
profile.removeOption(section, option)

Test Results

✅ All 203 tests pass successfully with Java 17

Tests run: 203, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS

Related

- Update version to 0.6.0-SNAPSHOT
- Set compiler target to Java 17 using maven.compiler.release
- Add UTF-8 source encoding property
- Migrate SCM from SourceForge SVN to GitHub Git
- Update project URL from ini4j.org to github.com/ini4j/ini4j
- Remove legacy SourceForge distribution management configuration
- Remove SourceForge issue management configuration
- Update developer info (timezone, email)
- Update JUnit from 4.5 to 4.13.2
- Update EasyMock from 2.3 to 5.2.0
- Remove easymockclassextension dependency (merged into EasyMock 3.2+)
- Remove retrotranslator-runtime dependency (Java 5 backward compatibility)
- Remove Windows-specific Maven profile
- Remove release-candidate profile with checkstyle/PMD configuration
- Clean up legacy build configuration and plugins
- Simplify project description
- Replace deprecated Class.newInstance() with getDeclaredConstructor().newInstance()
- Replace deprecated wrapper constructors (Character, Double, Float) with valueOf()
- Fix Proxy.newProxyInstance() classloader to handle null context classloader
- Fix BasicProfile transform method to correctly handle prefix with propertyFirstUpper

BREAKING CHANGE: Renamed Profile.remove(sectionName, optionName) to removeOption() to avoid conflict with Map.remove() in Java 17+. Users must update calls from profile.remove(section, option) to profile.removeOption(section, option).
@szkiba szkiba linked an issue Jan 28, 2026 that may be closed by this pull request
@szkiba
szkiba merged commit bddd1ef into main Jan 28, 2026
@szkiba
szkiba deleted the refactor-modernize-pom branch January 28, 2026 18:48
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.

Modernize POM

1 participant