https://issues.apache.org/bugzilla/show_bug.cgi?id=50601

           Summary: Redundant null checks before instanceof in equals()
           Product: Tomcat 7
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: s...@apache.org


Created an attachment (id=26497)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26497)
Patch to remove null checks

There are several instances of the following code in equals methods:

if (obj == null) return false;
if (!(obj instanceof SomeClass)) return false;

The null check is redundant, as null will fail the instanceof check.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to