Skip to content

Upgrade Java 6 to Java 11 (AB-171)#25

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

Upgrade Java 6 to Java 11 (AB-171)#25
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1775670522-upgrade-java-6-to-11

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Upgrades the project from Java 6 (source/target 1.6) to Java 11, including a major Dropwizard framework upgrade from 1.0.5 to 2.1.12. This brings in Hibernate 5.x, Jersey 2.41, Jetty 9.4.53, and Jackson 2.13.x transitively.

Key changes:

  • pom.xml: Decoupled Dropwizard BOM from ${project.version}, pinned to 2.1.12. Added dropwizard-dependencies BOM. Replaced <source>1.6</source>/<target>1.6</target> with <release>11</release>. Upgraded all Maven plugin versions. Added module-info.class exclusion to shade plugin filter.
  • EmployeeConfiguration.java: @NotEmpty import moved from deprecated org.hibernate.validator.constraints to javax.validation.constraints.
  • EmployeeDAO.java: Added explicit cast of namedQuery() result from Query<?> to Query<Employee> to satisfy Dropwizard 2.x's stricter AbstractDAO.list() signature.
  • AppTest.java: Migrated from JUnit 3 (TestCase) to JUnit 5 (Jupiter).

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

Review & Testing Checklist for Human

  • Verify the EmployeeDAO unchecked cast is safe at runtimenamedQuery() returns Query<?> in Hibernate 5.x; the cast to Query<Employee> compiles but is unchecked. Confirm the named query "com.dropwizard.employee.core.Employee.findAll" returns Employee entities as expected.
  • Smoke-test the application startup — run java -jar target/DropwizardEmployee-1.0.5.jar server example.yml with Java 11 and verify the server starts, GET /employee returns [], and POST /employee creates a record. The existing test suite is a single assertTrue(true) and provides no real coverage.
  • Review Dropwizard 1.x → 2.x behavioral changes — this is a major version jump. Check the Dropwizard 2.0 migration guide for any breaking changes relevant to this app (Hibernate session handling, Jersey resource lifecycle, etc.).

Notes

  • No removed Java EE module replacements (JAXB, JAX-WS, etc.) were needed — the codebase doesn't use them directly.
  • No obsolete JVM flags, Dockerfiles, or CI configs were found to update.
  • The dropwizard-dependencies BOM was added alongside dropwizard-bom per prescriptive guidance to ensure all transitive dependency versions are managed consistently.

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

- Upgrade Dropwizard BOM from 1.0.5 to 2.1.12 (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
- Update all other Maven plugins to modern versions
- Fix @notempty import: org.hibernate.validator.constraints -> javax.validation.constraints
- Fix EmployeeDAO.findAll() Query<Employee> typing for Hibernate 5.x compatibility
- Migrate test from JUnit 3 (TestCase) 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

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