Skip to content

Conversation

@devin-ai-integration
Copy link

feat: 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 compatibility fixes. The migration includes:

  • Java version: Updated from 11 to 17 in Maven configuration
  • Spring Boot upgrade: 2.2.0.M6 → 2.7.0 for Java 17 compatibility
  • Dependency updates: Lombok (1.18.30), Spock (2.3-groovy-4.0), Groovy (4.0.15), JaCoCo (0.8.8)
  • CI/CD: Updated CircleCI Docker image to openjdk:17-jdk
  • Documentation: Updated all docs to reflect Java 17 requirements
  • API compatibility: Fixed Spring HATEOAS API changes (CollectionModel.of() vs new CollectionModel())
  • Test fixes: Resolved timestamp precision issues in integration tests

All 89 unit tests and 22 integration tests are passing with the new Java 17 setup.

Review & Testing Checklist for Human

⚠️ This is a significant migration with multiple dependency updates - thorough testing is critical

  • Test Spring HATEOAS REST endpoints manually (GET /profiles/{id}/holds/, /profiles/{id}/checkouts/) to ensure the API changes work correctly
  • Run full test suite in a clean environment (./mvnw clean verify) to verify no hidden dependency conflicts
  • Test timestamp handling edge cases - the precision fix truncates to milliseconds, verify this doesn't cause issues with time-sensitive operations
  • Smoke test core application functionality - place holds, checkout books, return books to ensure Spring Boot upgrade didn't break business logic
  • Verify CircleCI build passes with the new Java 17 Docker image

Notes

  • The Spring Boot upgrade from 2.2.0.M6 to 2.7.0 is substantial and could have subtle breaking changes not caught by existing tests
  • The Spring HATEOAS API was updated to use static factory methods (CollectionModel.of(), EntityModel.of()) instead of constructors
  • One integration test was failing due to Java 17's different timestamp precision handling - fixed by truncating both expected and actual values to milliseconds for comparison

Session: https://app.devin.ai/sessions/d3477e80702244c4a8f82291f99112d2
Requested by: @callummiles

- Update Maven configuration to use Java 17
- Upgrade Spring Boot from 2.2.0.M6 to 2.7.0 for Java 17 compatibility
- Update dependencies: Lombok 1.18.30, Spock 2.3-groovy-4.0, JaCoCo 0.8.8
- Update CircleCI Docker image to openjdk:17-jdk
- Update documentation files to reflect Java 17 requirements
- Fix Spring HATEOAS API compatibility issues with CollectionModel/EntityModel
- Fix timestamp precision test failures for Java 17 compatibility
- 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