Skip to content

shipping: upgrade to Java 21 and Spring Boot 3.5 - #5

Open
devin-ai-integration[bot] wants to merge 1 commit into
devin/1789625189-ci-jdk21from
devin/1789625207-shipping-java21-boot3
Open

devin-ai-integration[bot] wants to merge 1 commit into
devin/1789625189-ci-jdk21from
devin/1789625207-shipping-java21-boot3

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Second module through the recipe proven on track in #1: shipping moves from Java 8 / Spring Boot 2.7.4 / Spring 5.3.18 to Java 21 + Spring Boot 3.5.16. Hand-written application code (ShippingDemo, ShipApi, Util, AppConfig) is unchanged; the change is pom.xml plus test hardening. Stacked on #4 (CI workflow) so the build (shipping) check on this PR shows the loop closing green.

Before / after

main this PR
mvn clean package on JDK 21 fails (NoSuchFieldError: JCTree$JCImport ... qualid — Lombok 1.18.24 vs JDK 21 javac) passes
spring-web 5.3.18 6.2.19
jackson-databind 2.14.0 2.21.4
snakeyaml 1.33 2.4
generated client annotations javax.annotation.* jakarta.annotation.* (271 @jakarta.annotation.Generated, 0 javax.annotation)
pom.xml 381 lines 158 lines

pom.xml — identical recipe to #1: parent 2.7.4 → 3.5.16, maven.compiler.source/target=1.8 → <java.version>21</java.version>; dropped every hand-pinned Boot-managed version and the per-plugin <dependencies> CVE-pin blocks; removed junit:junit 4 and jackson-jaxrs-json-provider; openapi-generator-maven-plugin 6.2.0 → 7.25.0 with <configOptions><useJakartaEe>true</useJakartaEe></configOptions> on both the OAuth and Shipping code-gen executions; jackson-databind-nullable 0.2.3 → 0.2.11.

Tests

  • ShippingApplicationTests (10 live calls against UPS CIE) gated with @EnabledIfEnvironmentVariable(named = "UPS_CIE_TESTS", matches = "true"); its org.junit.Assert imports moved to org.junit.jupiter.api.Assertions since JUnit 4 is gone.
  • New ShippingOfflineTest (plain JUnit 5, no Spring context so the CommandLineRunner never fires): binds MockRestServiceServer to a RestTemplate, then new ShippingDemo(restTemplate, appConfig).getShipApi(...) → asserts POST /security/v1/oauth/token → Bearer test-token on POST /api/shipments/v1/ship → response parsed through Util.jsonResultPreprocess (PackageResults object→array) into the regenerated SHIPResponseWrapper.
  • The offline test sends an empty SHIPRequestWrapper rather than loading ShipmentRequest.json: that fixture uses "AddressLine": "..." strings while the OpenAPI spec (and both the 6.2.0 and 7.25.0 generated models) declare AddressLine as List<String>. Verified pre-existing on main — not introduced here — and left for a follow-up.

Verification (JDK 21, Maven 3.9.11): cd shipping && mvn clean package → Tests run: 11, Failures: 0, Errors: 0, Skipped: 10, BUILD SUCCESS.

Link to Devin session: https://app.devin.ai/sessions/521876ab29a141689f30f94bc447ace7
Open in Devin Desktop: https://app.devin.ai/desktop/session/521876ab29a141689f30f94bc447ace7?variant=devin
Requested by: @matth4922-droid

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
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, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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