Skip to content

Upgrade from Java 6 to Java 11 (AB-163)#24

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

Upgrade from Java 6 to Java 11 (AB-163)#24
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1775290087-java-11-upgrade

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Upgrades the DropwizardEmployee project from Java 6 to Java 11 by bumping the Dropwizard framework from 1.0.5 to 2.1.12 and updating all Maven plugins and source code for compatibility.

Key changes:

  • Dropwizard: Decoupled BOM version from ${project.version} and pinned to 2.1.12; added dropwizard-dependencies BOM
  • Compiler: <source>1.6</source>/<target>1.6</target><release>11</release> via maven-compiler-plugin 3.13.0
  • Plugins: maven-surefire-plugin 2.19.1→3.2.5, maven-shade-plugin 2.4.3→3.6.0 (with module-info.class exclusion for Java 9+ uber JARs)
  • @NotEmpty import: Migrated from deprecated org.hibernate.validator.constraints.NotEmpty to javax.validation.constraints.NotEmpty
  • EmployeeDAO: Added explicit cast to Query<Employee> to satisfy Dropwizard 2.1.x's stricter AbstractDAO.list() signature
  • Tests: Migrated from JUnit 3 (junit.framework) to JUnit 5 (org.junit.jupiter)

Validated: mvn clean verify passes (compilation, tests, shaded JAR packaging).

Review & Testing Checklist for Human

  • Verify the app starts and serves requests — the only existing test is assertTrue(true). Run java -jar target/DropwizardEmployee-1.0.5.jar server example.yml and confirm GET /employee and POST /employee work against the H2 database. This is the most important validation since no integration tests exist.
  • Review the unchecked cast in EmployeeDAO.findAll() — the @SuppressWarnings("unchecked") cast from Query<?> to Query<Employee> is a pragmatic fix for the Dropwizard 2.1.x API change. Confirm this is acceptable vs. switching to a typed CriteriaQuery approach.
  • Confirm Dropwizard 1.0.5 → 2.1.12 behavioral compatibility — this is a major version jump. Review the Dropwizard upgrade notes for any breaking changes relevant to this app's usage of Hibernate, Jersey, Jetty, and Liquibase migrations.

Notes

  • No CI pipeline exists in this repo, so the build was validated locally only.
  • The example.yml configuration and migrations.xml Liquibase changeset required no changes.

Link to Devin session: https://app.devin.ai/sessions/9715e771bf3f4ae0b554873d62aa4ba1
Requested by: @wavecreator1

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

Co-Authored-By: Siddhant Seghal <siddxs5@gmail.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 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.

0 participants