Upgrade from Java 6 to Java 11#22
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Conversation
- Upgrade Dropwizard from 1.0.5 to 2.1.12 (decouple BOM from project version) - Add dropwizard-dependencies BOM for transitive dependency management - 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 - Migrate @notempty import from org.hibernate.validator.constraints to javax.validation.constraints - Fix EmployeeDAO.findAll() typing for Hibernate 5.x Query API - Migrate test from JUnit 3 to JUnit 4 with vintage engine for surefire 3.x - Add explicit junit 4.13.2 and junit-vintage-engine 5.9.3 test dependencies Co-Authored-By: Siddhant Seghal <siddxs5@gmail.com>
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 DropwizardEmployee project from Java 6 to Java 11. This involves a major Dropwizard framework upgrade (1.0.5 → 2.1.12) since Dropwizard 1.x does not support Java 11, along with build plugin updates and source code fixes for API changes.
Build changes (
pom.xml):${project.version}, pinned to2.1.12dropwizard-dependenciesBOM for transitive dependency management<source>1.6</source>/<target>1.6</target>→<release>11</release>module-info.classexclusion in shade plugin filters (required for Java 9+ uber-JARs)junit:junit:4.13.2andjunit-vintage-engine:5.9.3test dependenciesSource changes:
EmployeeConfiguration.java: Migrated@NotEmptyfromorg.hibernate.validator.constraints→javax.validation.constraints(deprecated in Hibernate Validator 6.x)EmployeeDAO.java: Added cast toQuery<Employee>fornamedQuery()return type (Hibernate 5.x API change)AppTest.java: Migrated from JUnit 3 (extends TestCase) to JUnit 4 (@Testannotation)Validated with Java 11:
mvn clean verifypasses — zero compilation errors, 1 test passes.Review & Testing Checklist for Human
java -jar target/DropwizardEmployee-1.0.5.jar server example.ymlunder Java 11 and verifyPOST /employeeandGET /employeeendpoints work. The test suite is minimal (one trivial assertion) and does not exercise the actual application.EmployeeDAO.findAll(): The@SuppressWarnings("unchecked")cast fromQuery<?>toQuery<Employee>is safe for this specific named query but verify it doesn't mask issues.Notes
AppTest.testApp) only assertsassertTrue(true)— it provides no meaningful coverage of application behavior. Consider adding integration tests.Link to Devin session: https://app.devin.ai/sessions/3ca980d7adbf4f53a924072bb929b7e6
Requested by: @wavecreator1