Skip to content

Comments

Add missing Compatibility Library handling for VecDocumentVersion#getSpecificationWithType#443

Open
DManstrator wants to merge 4 commits intodevelopfrom
bugfix/compatibility-wrapping-of-get-specification-with-type
Open

Add missing Compatibility Library handling for VecDocumentVersion#getSpecificationWithType#443
DManstrator wants to merge 4 commits intodevelopfrom
bugfix/compatibility-wrapping-of-get-specification-with-type

Conversation

@DManstrator
Copy link
Collaborator

Pull Request

Changes

  • Code
  • Documentation
  • Other:

Description

The VecDocumentVersion classes implement HasSpecifications which define getSpecificationsWithType and getSpecificationWithType. Due to that, the Compability Library needs to define special handling for those methods. The getSpecificationsWithType method was already covered but getSpecificationWithType was still missing.

This PR adds the missing handling for getSpecificationWithType.

@DManstrator DManstrator self-assigned this Feb 3, 2026
@DManstrator DManstrator added Compatibility Issue / PR regarding the Compatibility Library java Pull requests that update Java code Bug Fix PR which fixes a bug. labels Feb 3, 2026
@DManstrator DManstrator force-pushed the bugfix/compatibility-wrapping-of-get-specification-with-type branch 2 times, most recently from f9d4dae to 5ac19ce Compare February 3, 2026 11:36
@DManstrator
Copy link
Collaborator Author

DManstrator commented Feb 3, 2026

@beckerjohannes: I didn't create the *DocumentVersionWrapperTest.java for the other cases only to copy-paste the test from the Vec12To20DocumentVersionWrapperTest. It seemed a bit unnecessary to me. Would you agree with that or should I add the tests?

Copy link
Contributor

@beckerjohannes beckerjohannes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest looks fine, However, it is not mergeable because of conflict.

Comment on lines +106 to +107
.filter(Optional::isPresent)
.map(Optional::get)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For that, the Optional has a flatMap function. .flatMap(v -> v) would have the same result and is more readable

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to cause type erasure of the generic here so I would keep it like it's currently is.

image

Is that okay for you?

# Conflicts:
#	compatibility/compatibility-vec12to20/src/test/java/com/foursoft/harness/compatibility/vec12to20/wrapper/vec12to20/Vec12To20DocumentVersionWrapperTest.java
@DManstrator DManstrator force-pushed the bugfix/compatibility-wrapping-of-get-specification-with-type branch from ef9c03f to c6eb90e Compare February 10, 2026 13:24
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
27.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix PR which fixes a bug. Compatibility Issue / PR regarding the Compatibility Library java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants