api: remove unused equals/hashCode from TemplateOVFPropertyResponse - #14049
Open
nagaboinaramgopal wants to merge 1 commit into
Open
api: remove unused equals/hashCode from TemplateOVFPropertyResponse#14049nagaboinaramgopal wants to merge 1 commit into
nagaboinaramgopal wants to merge 1 commit into
Conversation
DaanHoogland
reviewed
Sep 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #14049 +/- ##
============================================
- Coverage 16.34% 16.34% -0.01%
Complexity 13574 13574
============================================
Files 5669 5669
Lines 501368 501360 -8
Branches 60903 60902 -1
============================================
- Hits 81964 81960 -4
+ Misses 410219 410212 -7
- Partials 9185 9188 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TemplateOVFPropertyResponse is not referenced anywhere outside its own class: nothing keys it in a set or map or compares instances, so its equals()/hashCode() pair has no callers. hashCode() also dereferenced key without a null guard. Remove both methods rather than harden dead code, which also drops the NPE path.
nagaboinaramgopal
force-pushed
the
fix/ovf-property-hashcode-npe
branch
from
September 5, 2026 11:08
7801830 to
fa7e114
Compare
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.
equals() tolerates a null key but hashCode() dereferenced it directly, so hashing an instance whose key was never set threw NullPointerException. These responses define equals/hashCode precisely so they can be collected in hash-based sets, making a null key a reachable state. Return 0 for a null key to match the null-safe equals().
Tested: new unit test TemplateOVFPropertyResponseTest (fails before, passes after)