You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "qian (Jira)" <ji...@apache.org> on 2022/06/17 08:37:00 UTC

[jira] [Created] (SPARK-39504) No-null object invoke equal to avoid NPE

qian created SPARK-39504:
----------------------------

             Summary: No-null object invoke equal to avoid NPE
                 Key: SPARK-39504
                 URL: https://issues.apache.org/jira/browse/SPARK-39504
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core
    Affects Versions: 3.2.1
            Reporter: qian


Since {{NullPointerException}} can possibly be thrown while calling the _equals_ method of {{{}Object{}}}, _equals_ should be invoked by a constant or an object that is definitely not {_}null{_}.
{quote}Positive example: {{"test".equals(object);}}
Counter example: {{object.equals("test");}}
{quote}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org