[
https://issues.apache.org/jira/browse/THRIFT-5016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Geyer resolved THRIFT-5016.
--------------------------------
Fix Version/s: 0.14.0
Resolution: Fixed
> Do Not Check 'other' For Null in Equals
> ---------------------------------------
>
> Key: THRIFT-5016
> URL: https://issues.apache.org/jira/browse/THRIFT-5016
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.13.0
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Fix For: 0.14.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {code:java}
> @Override
> public boolean equals(java.lang.Object that) {
> if (that == null)
> return false;
> if (that instanceof CrossPlatformResource)
> return this.equals((CrossPlatformResource)that);
> return false;
> }
> {code}
> There is a null check before {{instanceof}}. This check is superfluous:
> https://stackoverflow.com/questions/2950319/is-null-check-needed-before-calling-instanceof
--
This message was sent by Atlassian Jira
(v8.3.4#803005)