Skip to content

fix: null Id in EasyPostObject.GetHashCode - #679

Merged
Justin Hammond (Justintime50) merged 3 commits into
masterfrom
fix_null_id_hashcode
Nov 23, 2026
Merged

Justin Hammond (Justintime50) merged 3 commits into
masterfrom
fix_null_id_hashcode

Conversation

@Justintime50

@Justintime50 Justin Hammond (Justintime50) commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Description

  • Fixes EasyPostObject.GetHashCode() (and therefore Equals(), ==, List.Remove, Contains, etc.) throwing a NullReferenceException when Id is null. Many objects the API returns have no id (e.g. TrackingDetail, Fee, Message, Options, Verifications, TaxIdentifier, CarrierType, and paginated collections), as do model objects built locally with new.
  • Preps v7.13.1 for release: bumps the version and dates the CHANGELOG entry

Closes #678

Testing

  • Added TestHashCodeWhenIdIsNull, which reproduced the NullReferenceException before the fix and passes after
  • All unit tests pass locally (net9.0)

Pull Request Type

  • Bug fix (non-breaking change which fixes an issue)

@Justintime50
Justin Hammond (Justintime50) marked this pull request as ready for review November 23, 2026 18:25
@Justintime50
Justin Hammond (Justintime50) merged commit 8288ef7 into master Nov 23, 2026
19 checks passed
@Justintime50
Justin Hammond (Justintime50) deleted the fix_null_id_hashcode branch November 23, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: EasyPostObject.GetHashCode() throws null error when Id is null

2 participants