Skip to content

Conversation

@devin-ai-integration
Copy link

Migrate from Java 11 to Java 17

Summary

This PR migrates the library management system from Java 11 to Java 17, including necessary dependency updates and configuration changes. The migration includes:

  • Java version: 11 → 17
  • Spring Boot: 2.2.0.M6 → 2.7.18
  • Dependency updates: Lombok, Spock/Groovy, gmavenplus-plugin, JaCoCo all updated for Java 17 compatibility
  • API fixes: Updated Spring HATEOAS usage to use new static factory methods (CollectionModel.of(), EntityModel.of())
  • CI/CD: Updated CircleCI Docker image to circleci/openjdk:17-jdk
  • Documentation: Updated all references to Java 17 requirement
  • Test fixes: Resolved timing precision issues in integration tests

All 89 unit tests and 22 integration tests pass successfully after the migration.

Review & Testing Checklist for Human

This is a high-risk change involving major framework upgrades. Please verify:

  • End-to-end functionality testing: Test core library operations (placing holds, checkouts, patron profiles) to ensure Spring Boot 2.7 upgrade didn't break business logic
  • REST API verification: Manually test patron profile endpoints (/profiles/{patronId}/holds, /profiles/{patronId}/checkouts) to verify Spring HATEOAS changes work correctly
  • Integration test timing: Verify the timing tolerance fix in FindingPatronProfileInDatabaseIT isn't masking a real timing issue - consider running tests multiple times
  • CI/CD pipeline: Ensure CircleCI builds successfully with new Java 17 Docker image
  • Performance check: Run a quick performance comparison to ensure Java 17 doesn't introduce unexpected regressions

Notes

  • The migration required fixing Spring HATEOAS API breaking changes where constructors were replaced with static factory methods
  • Had to resolve Java 17 timing precision issues in tests that were comparing exact timestamps
  • Removed explicit spring-hateoas.version property to let Spring Boot manage the compatible version
  • Some ArchUnit warnings about Java 17 class files are expected and don't affect functionality

Link to Devin run: https://app.devin.ai/sessions/b2c1b8ad23424a5c8db79cd700e0d3cb
Requested by: @callummiles

- Update pom.xml: Java version 11 -> 17, Spring Boot 2.2.0.M6 -> 2.7.18
- Update Lombok version 1.18.4 -> 1.18.24 for Java 17 compatibility
- Update Spock/Groovy versions for Java 17 compatibility
- Update gmavenplus-plugin 1.6.2 -> 1.13.1 for Java 17 support
- Update JaCoCo plugin 0.8.3 -> 0.8.8 for Java 17 class file support
- Remove explicit spring-hateoas version to use Spring Boot managed version
- Fix Spring HATEOAS API changes: use CollectionModel.of() and EntityModel.of()
- Update CircleCI Docker image: circleci/openjdk:11-jdk-stretch -> circleci/openjdk:17-jdk
- Update documentation files to reflect Java 17 requirement
- Fix timing precision test issue in FindingPatronProfileInDatabaseIT for Java 17

All 89 unit tests and 22 integration tests pass successfully.

Co-Authored-By: callum.miles@windsurf.com <cwmiles18@gmail.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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