-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(validation): avoid policy evaluation on consumer side after agreement #2068
fix(validation): avoid policy evaluation on consumer side after agreement #2068
Conversation
...n/java/org/eclipse/dataspaceconnector/spi/contract/validation/ContractValidationService.java
Fixed
Show fixed
Hide fixed
Codecov ReportBase: 64.31% // Head: 64.56% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2068 +/- ##
==========================================
+ Coverage 64.31% 64.56% +0.24%
==========================================
Files 780 783 +3
Lines 16564 16638 +74
Branches 1077 1078 +1
==========================================
+ Hits 10653 10742 +89
+ Misses 5461 5442 -19
- Partials 450 454 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
What this PR changes/adds
Changes contract validation on consumer side when it receives the "confirmed" message from the provider, at this point the agreement is already reached and there should be only a formal validation of the id and the policy, no need to evaluate the latter.
Why it does that
It was an unnecessary evaluation.
Further notes
validate
method tovalidateConfirmed
to have a clear distinction on what's the purpose of the method avoiding confusion with the others.ContractId
to a more object oriented one.validateConfirmed
returns aResult
, so the caller can obtain a detail on what was the problem.Linked Issue(s)
Closes #1975
Checklist
no-changelog
)