Skip to content

Upgrade from Java 6 to Java 11#23

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1775206890-java11-upgrade
Open

Upgrade from Java 6 to Java 11#23
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1775206890-java11-upgrade

Conversation

@devin-ai-integration
Copy link
Copy Markdown

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

Summary

Upgrades the DropwizardEmployee project from Java 6 to Java 11, including a major Dropwizard framework upgrade from 1.0.5 to 2.1.12 and all necessary source code fixes.

Build changes (pom.xml):

  • Decoupled Dropwizard BOM version from ${project.version} — now pinned to 2.1.12
  • Added dropwizard-dependencies BOM import for transitive dependency management
  • Compiler: <source>1.6</source>/<target>1.6</target><release>11</release>
  • Plugin upgrades: maven-compiler-plugin 3.6.0→3.13.0, maven-surefire-plugin 2.19.1→3.2.5, maven-shade-plugin 2.4.3→3.6.0
  • Added module-info.class exclusion to shade plugin filters (Java 9+ uber-JAR compatibility)

Source code fixes:

  • EmployeeConfiguration.java: @NotEmpty import moved from org.hibernate.validator.constraintsjavax.validation.constraints (deprecated in newer Hibernate Validator)
  • EmployeeDAO.java: namedQuery()namedTypedQuery() to satisfy Dropwizard 2.x's type-safe AbstractDAO.list(Query<E>) signature
  • AppTest.java: Migrated from JUnit 3 (junit.framework.*) to JUnit 5 (org.junit.jupiter.api.*)

Validation: mvn clean verify passes — zero compilation errors, all tests pass.

Review & Testing Checklist for Human

  • Verify runtime startup: The test suite is minimal (one trivial assertion). Run java -jar target/DropwizardEmployee-1.0.5.jar server example.yml and confirm the app boots, the /employee GET and POST endpoints respond correctly, and Hibernate initializes against the H2 database without errors.
  • Confirm namedTypedQuery behavior: Verify that EmployeeDAO.findAll() returns the correct typed results at runtime — this was changed from namedQuery() to namedTypedQuery() to fix a compilation error with Dropwizard 2.x's stricter generics.
  • Review transitive dependency changes: The Dropwizard 1.0.5 → 2.1.12 jump pulls in significantly different transitive dependencies (Jetty 9.4.53, Hibernate 5.6.x, Jackson 2.13.x, Jersey 2.41). Check for any compatibility concerns with downstream consumers.

Notes

  • The project version remains 1.0.5 — it is now decoupled from the Dropwizard framework version, which was previously tied via ${project.version}.
  • Shade plugin warnings about overlapping resources in the uber-JAR are benign (duplicate LICENSE/NOTICE files from different JARs).
  • Jira ticket: AB-159

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


Open with Devin

- Update maven-compiler-plugin to 3.13.0 with <release>11</release>
- Decouple Dropwizard BOM from project version; upgrade to Dropwizard 2.1.12
- Add dropwizard-dependencies BOM import
- 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: namedQuery() -> namedTypedQuery() for Hibernate 5.x type safety
- 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

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 3 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.

0 participants