Skip to content

Upgrade Java 6 to Java 11 with Dropwizard 2.1.12#30

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1775699443-upgrade-java-6-to-11
Open

Upgrade Java 6 to Java 11 with Dropwizard 2.1.12#30
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1775699443-upgrade-java-6-to-11

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Apr 9, 2026

Summary

Upgrades the project from Java 6 to Java 11, including a major Dropwizard framework bump from 1.0.5 to 2.1.12.

Build changes (pom.xml):

  • Decoupled Dropwizard BOM version from ${project.version} (1.0.5) → pinned to 2.1.12; added dropwizard-dependencies BOM
  • maven-compiler-plugin 3.6.0 → 3.13.0 with <release>11</release> replacing <source>1.6</source>/<target>1.6</target>
  • maven-surefire-plugin 2.19.1 → 3.2.5
  • maven-shade-plugin 2.4.3 → 3.6.0; added module-info.class exclusion filter for uber-JAR compatibility

Source changes:

  • EmployeeConfiguration.java: @NotEmpty import moved from org.hibernate.validator.constraintsjavax.validation.constraints (the Hibernate-specific annotation was removed in newer versions)
  • EmployeeDAO.java: Added explicit cast of namedQuery() result to Query<Employee> to satisfy Dropwizard 2.x's stricter Hibernate typing
  • AppTest.java: Migrated from JUnit 3 (junit.framework.TestCase) to JUnit 5 (org.junit.jupiter.api)

mvn clean verify passes with zero compilation errors and all tests passing.

Review & Testing Checklist for Human

  • Start the application locally (java -jar target/DropwizardEmployee-1.0.5.jar server example.yml) and verify it boots without errors — the existing test suite is essentially a no-op (assertTrue(true)) and provides no runtime confidence
  • Test the REST endpointsPOST /employee and GET /employee — to verify Hibernate/H2 persistence still works correctly after the Dropwizard 1.x → 2.x upgrade
  • Verify the unchecked cast in EmployeeDAO.findAll() doesn't cause ClassCastException at runtime — the @SuppressWarnings("unchecked") cast from Query<?> to Query<Employee> is the riskiest source change
  • Check example.yml compatibility — Dropwizard 2.x may have changed config parsing behavior; verify no startup warnings about deprecated/renamed config keys

Notes

  • The Dropwizard BOM was previously tied to ${project.version} (1.0.5), meaning all Dropwizard transitive dependency versions were locked to 1.0.5. This PR decouples them to 2.1.12.
  • The test suite has no meaningful coverage — only a single assertTrue(true). Runtime smoke-testing is essential.

Link to Devin session: https://app.devin.ai/sessions/ad3edcfb24ce4126842bf5dd0bc7c82c
Requested by: @pqn


Open with Devin

- Update Dropwizard BOM from 1.0.5 to 2.1.12 and add dropwizard-dependencies BOM
- Update maven-compiler-plugin to 3.13.0 with <release>11</release>
- Update maven-surefire-plugin to 3.2.5
- Update maven-shade-plugin to 3.6.0 with module-info.class exclusion
- Fix @notempty import: org.hibernate.validator.constraints -> javax.validation.constraints
- Fix EmployeeDAO.findAll() typing for Dropwizard 2.x Hibernate compatibility
- Migrate test from JUnit 3 to JUnit 5 (Jupiter)

Co-Authored-By: prem@cognition.ai <prem@cognition.ai>
@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 and CI monitoring

Copy link
Copy Markdown
Author

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

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 potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in 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