Upgrade Java 6 to Java 11 with Dropwizard 2.1.12#30
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Upgrade Java 6 to Java 11 with Dropwizard 2.1.12#30devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- 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>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):${project.version}(1.0.5) → pinned to2.1.12; addeddropwizard-dependenciesBOMmaven-compiler-plugin3.6.0 → 3.13.0 with<release>11</release>replacing<source>1.6</source>/<target>1.6</target>maven-surefire-plugin2.19.1 → 3.2.5maven-shade-plugin2.4.3 → 3.6.0; addedmodule-info.classexclusion filter for uber-JAR compatibilitySource changes:
EmployeeConfiguration.java:@NotEmptyimport moved fromorg.hibernate.validator.constraints→javax.validation.constraints(the Hibernate-specific annotation was removed in newer versions)EmployeeDAO.java: Added explicit cast ofnamedQuery()result toQuery<Employee>to satisfy Dropwizard 2.x's stricter Hibernate typingAppTest.java: Migrated from JUnit 3 (junit.framework.TestCase) to JUnit 5 (org.junit.jupiter.api)mvn clean verifypasses with zero compilation errors and all tests passing.Review & Testing Checklist for Human
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 confidencePOST /employeeandGET /employee— to verify Hibernate/H2 persistence still works correctly after the Dropwizard 1.x → 2.x upgradeEmployeeDAO.findAll()doesn't causeClassCastExceptionat runtime — the@SuppressWarnings("unchecked")cast fromQuery<?>toQuery<Employee>is the riskiest source changeexample.ymlcompatibility — Dropwizard 2.x may have changed config parsing behavior; verify no startup warnings about deprecated/renamed config keysNotes
${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.assertTrue(true). Runtime smoke-testing is essential.Link to Devin session: https://app.devin.ai/sessions/ad3edcfb24ce4126842bf5dd0bc7c82c
Requested by: @pqn