Task 04 upgrade java#5
Open
mbjones wants to merge 25 commits into
Open
Conversation
The package now compiles under java 1.8 language target using modern mvn and jdk.
taojing2002
approved these changes
Mar 23, 2026
taojing2002
left a comment
Contributor
There was a problem hiding this comment.
Looks great! Thank you!
THe schema url pointed at redmine.dataone.org which no longer exists and now lives at https://github.com/DataONEorg/d1_schemas.
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Java build and source compatibility for newer JDKs, updates JAXB/logging dependencies, and removes stylesheet injection support from TypeMarshaller.
Changes:
- Updates Maven configuration/dependencies for modern Java and adds a GitHub Actions Maven build.
- Migrates Log4j 1.x usages to Log4j 2 API imports.
- Removes stylesheet marshalling behavior and modernizes tests/source for newer Java and library APIs.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pom.xml |
Reworks Java/compiler settings, dependencies, plugins, and release metadata. |
.github/workflows/maven.yml |
Adds Maven CI on GitHub Actions. |
src/main/resources/buildInfo/buildInfo.properties |
Removes filtered build metadata resource. |
src/main/java/org/dataone/service/util/TypeMarshaller.java |
Moves marshalling logic to 2-arg overload and deprecates stylesheet overload. |
src/main/java/org/dataone/service/exceptions/BaseException.java |
Migrates logger to Log4j 2 API. |
src/main/java/org/dataone/mimemultipart/MultipartRequestResolver.java |
Migrates logger and makes it static final. |
src/main/java/org/dataone/service/types/v1/TypeFactory.java |
Migrates logger to Log4j 2 API. |
src/main/java/org/dataone/service/types/v1/util/AuthUtils.java |
Migrates logger and removes unused imports. |
src/main/java/org/dataone/service/types/v1/util/ServiceMethodRestrictionUtil.java |
Migrates logger to Log4j 2 API. |
src/main/java/org/dataone/service/types/v1/util/TypeCompareUtil.java |
Migrates logger to Log4j 2 API. |
src/main/java/org/dataone/service/types/v2/util/ServiceMethodRestrictionUtil.java |
Migrates logger to Log4j 2 API. |
src/main/java/org/dataone/service/types/v2/util/ObjectFormatServiceImpl.java |
Migrates logger to Log4j 2 API. |
src/main/java/org/dataone/service/types/v2/TypeFactory.java |
Replaces deprecated reflective construction and removes unused local variable. |
src/main/java/org/dataone/service/util/ExceptionalInputStream.java |
Replaces boxed Boolean constructors with constants. |
src/main/java/org/dataone/service/util/AccessRuleMarshallingAdapter.java |
Removes unused import. |
src/main/java/org/dataone/service/types/v1/ObjectFormatList.java |
Removes redundant Serializable declaration. |
src/main/java/org/dataone/service/types/v1/Permission.java |
Removes redundant enum Serializable declaration. |
src/main/java/org/dataone/service/types/v1/ReplicationStatus.java |
Removes redundant enum Serializable declaration. |
src/main/java/org/dataone/service/types/v1/ServiceMethodRestriction.java |
Removes redundant Serializable declaration. |
src/main/java/org/dataone/service/types/v1_1/QueryEngineList.java |
Removes unused import. |
src/main/java/org/dataone/service/types/v2/Node.java |
Removes redundant Serializable declaration. |
src/main/java/org/dataone/service/types/v2/SystemMetadata.java |
Removes redundant Serializable declaration. |
src/main/java/org/dataone/service/types/v2/OptionList.java |
Removes unused import. |
src/test/java/org/dataone/service/util/TypeMarshallerTestCase.java |
Updates logger imports and adjusts stylesheet-related tests. |
src/test/java/org/dataone/service/util/IdentifierEncodingTestCase.java |
Updates logger imports and simplifies exception assertions. |
src/test/java/org/dataone/service/util/ExceptionHandlerTestCase.java |
Adds explicit UTF-8 handling and modernizes integer boxing. |
src/test/java/org/dataone/service/util/D1Url1TestCase.java |
Updates logger imports and integer boxing. |
src/test/java/org/dataone/service/types/v2/util/NodelistUtilTestCase.java |
Adds explicit UTF-8 handling. |
src/test/java/org/dataone/service/types/v1/SystemMetadataTestCase.java |
Updates logger imports. |
src/test/java/org/dataone/service/types/v2/SystemMetadataTestCase.java |
Updates logger imports. |
src/test/java/org/dataone/service/types/v1/TypeSamplesTestCase.java |
Updates logger imports and schema URL loading. |
src/test/java/org/dataone/service/types/D1NamespaceContext.java |
Updates logger imports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Bump joda-time to 2.14.2, httpmime to 4.5.14, and javax.servlet-api to 4.0.1 - Update MultipartRequest for Servlet 3.1+/4.x compatibility by enabling changeSessionId/getContentLengthLong/upgrade - Add missing HttpUpgradeHandler import and initialize wrapped request in constructor to ensure safe delegation - Verified with clean build and tests (mvn clean test)
Member
Author
|
@taojing2002 can you take another look at this please? Mostly the same, but I did some additional cleanup, and there is a much more detailed overview in the PR description above. |
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.
PR introduces changes to compile under java 17, 21, and 25. Tested with Eclipse Temurin.
All tests pass. Additional details follow in a summary by Copilot:
Summary
This PR modernizes d1_common_java for current Java LTS/runtime usage, updates CI/build tooling, and aligns dependency/deploy resolution with maven.dataone.org.
It also removes deprecated stylesheet-based XML marshalling behavior that no longer works on modern JDKs and simplifies related code/tests.
Closes #4
Closes #3
Why this change
What changed
Behavioral impact
Validation
Notes for reviewers