Skip to content

Commit

Permalink
Simplify TimeZoneInfo.Equals(object) (dotnet/coreclr#8514)
Browse files Browse the repository at this point in the history
Equals(TimeZoneInfo) already handles null.

Commit migrated from dotnet/coreclr@6d65799
  • Loading branch information
justinvp authored and jkotas committed Dec 8, 2016
1 parent 0894efb commit 07bbec6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,7 @@ public bool Equals(TimeZoneInfo other) {
}

public override bool Equals(object obj) {
TimeZoneInfo tzi = obj as TimeZoneInfo;
if (null == tzi) {
return false;
}
return Equals(tzi);
return Equals(obj as TimeZoneInfo);
}

//
Expand Down

0 comments on commit 07bbec6

Please sign in to comment.