Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8223112

Clarify operational semantics of java.util.Objects.equals()

XMLWordPrintable

    • b20
    • Not verified

      ADDITIONAL SYSTEM INFORMATION :
      not OS / runtime specific issue.

      A DESCRIPTION OF THE PROBLEM :
      In Objects.equals(myObject1, myObject2), if myObject2 is null and if myObject1.equals() doesn't handle null check, nullPointerException will be thrown.

      JavaDoc says, false will be returned if either of the parameter is null but it is not handled for second parameter.


      FREQUENCY : always


            darcy Joe Darcy
            webbuggrp Webbug Group
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: