Skip to content
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(VulnerabilityReference): Do not deserialize a lazy property #7789

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

sschuberth
Copy link
Member

This is a fixup for 8b6fe4f which introduced the severityRating property.

@sschuberth sschuberth requested a review from a team as a code owner November 1, 2023 20:26
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (73e5110) 67.84% compared to head (6f94149) 67.84%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7789   +/-   ##
=========================================
  Coverage     67.84%   67.84%           
  Complexity     2045     2045           
=========================================
  Files           357      357           
  Lines         16770    16771    +1     
  Branches       2378     2378           
=========================================
+ Hits          11378    11379    +1     
  Misses         4402     4402           
  Partials        990      990           
Flag Coverage Δ
test 35.72% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...n/kotlin/vulnerabilities/VulnerabilityReference.kt 66.66% <100.00%> (+3.03%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This is a fixup for 8b6fe4f which introduced the `severityRating`
property.

Signed-off-by: Sebastian Schuberth <[email protected]>
@@ -30,6 +32,7 @@ import java.net.URI
* with a list of references; each reference points to the source of the information and has some detailed information
* provided by this source.
*/
@JsonIgnoreProperties(value = ["severity_rating"], allowGetters = true)
Copy link
Member

@fviernau fviernau Nov 1, 2023

Choose a reason for hiding this comment

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

Should we also not serialize the property, because it is redundant? If so, probably it would be good to instead annotate the property with @JsonIgnore. edit: <-- isn't this a funny username, referenced by accident

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we also not serialize the property, because it is redundant?

That's more or less the discusion I had with @mnonnenmacher over here. Not serializing it would require to reintroduce the EvaluatedVulnerabilityReference class.

Copy link
Member

Choose a reason for hiding this comment

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

My preference would (as well?) be to not have it serialized in OrtResult at all, because of the reasons mentioned there. However, that's out of scope of this PR.

@sschuberth
Copy link
Member Author

Merging despite the unrelated NuGetFunTest failure.

@sschuberth sschuberth merged commit 0820a7b into main Nov 1, 2023
21 of 22 checks passed
@sschuberth sschuberth deleted the no-lazy-prop-deser branch November 1, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants