Coercion of Enums in Nashorn works differently than in Rhino
问题 It seems that Java enums are no longer coerced into their string value: java.math.RoundingMode.UP == "UP" evaluates to true in Java 7 but to false in Java 8 when executed in the JavaScript engine. Does anybody know if this is actually a bug or just something in the specification? Thanks! 回答1: This is a bug: https://bugs.openjdk.java.net/browse/JDK-8072426 ..................................................................... 来源: https://stackoverflow.com/questions/28152990/coercion-of-enums-in