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

Can't compare Java enums to strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b53
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Example:

            java.math.RoundingMode.UP == "UP"

        evaluates to true in Rhino and to false in Nashorn. Reported at:
        http://mail.openjdk.java.net/pipermail/nashorn-dev/2015-February/004142.html

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                attila Attila Szegedi
                Reporter:
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: