You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is exitException intentionally excluded from ExitStatus#equals/hashCode?
#5368
I noticed that exitException (added in 6.0.3 via GH-4975) is not included in ExitStatus#toString(),
and since equals()/hashCode() delegate to toString(), two instances with different exceptions
are considered equal:
ExitStatusa = newExitStatus("FAILED", "error", newSQLException("connection lost"));
ExitStatusb = newExitStatus("FAILED", "error", newTimeoutException("timed out"));
a.equals(b); // trueI'm curious whether this is by design — i.e., exitException is treated as supplementary metadata
andnotpartoftheidentity — orifthiswassimplynotupdatedwhenthefieldwasintroduced.
Eitherwayisfine, justwantedtounderstandtheintent. Thanks!
---
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Body:
Hi,
I noticed that
exitException(added in 6.0.3 via GH-4975) is not included inExitStatus#toString(),and since
equals()/hashCode()delegate totoString(), two instances with different exceptionsare considered equal:
All reactions