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

Strict equality operators should not be optimistic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • None
    • core-libs
    • None
    • b131
    • generic
    • generic

    Description

      As shown by the output of JDK-8161665 test code, long/Long operands are treated optimistically in strict equality operators. This should not be the case as the original type of operands must be preserved in ===/!== (similar to the typeof and instanceof operators).

      https://bugs.openjdk.java.net/browse/JDK-8161665?focusedCommentId=13975389&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13975389

      Attachments

        Activity

          People

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: