[ https://issues.apache.org/jira/browse/GROOVY-7914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-7914: -------------------------------- Description: This might be related to GROOVY-4526 -- supposedly a PR over there has been merged, but the bug is still flagged as open (and indeed, I can locally reproduce it). This one instead caused problems when handling org.json.JSONObject That type uses its own internal JSONObject.Null class to represent null inside json (which is useful to distinguish between keys being missing, and values explicitly being set to null) it overrides .equals(other) to check if the other object is null, but that method is never invoked basically: JSONObject.NULL == null false JSONObject.NULL.equals(null) true was: This might be related to https://issues.apache.org/jira/browse/GROOVY-4526 supposedly a PR over there has been merged, but the bug is still flagged as open (and indeed, I can locally reproduce it). This one instead caused problems when handling org.json.JSONObject That type uses its own internal JSONObject.Null class to represent null inside json (which is useful to distinguish between keys being missing, and values explicitly being set to null) it overrides .equals(other) to check if the other object is null, but that method is never invoked basically: JSONObject.NULL == null false JSONObject.NULL.equals(null) true > Comparison operator does not delegate to .equals() for null > ----------------------------------------------------------- > > Key: GROOVY-7914 > URL: https://issues.apache.org/jira/browse/GROOVY-7914 > Project: Groovy > Issue Type: Bug > Reporter: Dario Bertini > Priority: Major > > This might be related to GROOVY-4526 -- supposedly a PR over there has been > merged, but the bug is still flagged as open (and indeed, I can locally > reproduce it). > This one instead caused problems when handling org.json.JSONObject > That type uses its own internal JSONObject.Null class to represent null > inside json (which is useful to distinguish between keys being missing, and > values explicitly being set to null) > it overrides .equals(other) to check if the other object is null, but that > method is never invoked > basically: > JSONObject.NULL == null > false > JSONObject.NULL.equals(null) > true -- This message was sent by Atlassian Jira (v8.20.10#820010)