Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4E0E4200B6A for ; Mon, 22 Aug 2016 17:31:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4CDEC160AC4; Mon, 22 Aug 2016 15:31:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BABEA160AB3 for ; Mon, 22 Aug 2016 17:31:21 +0200 (CEST) Received: (qmail 11940 invoked by uid 500); 22 Aug 2016 15:31:21 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 11921 invoked by uid 99); 22 Aug 2016 15:31:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2016 15:31:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D564F2C014C for ; Mon, 22 Aug 2016 15:31:20 +0000 (UTC) Date: Mon, 22 Aug 2016 15:31:20 +0000 (UTC) From: "Dario Bertini (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (GROOVY-7914) Comparison operator does not delegate to .equals() for null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 22 Aug 2016 15:31:22 -0000 Dario Bertini created GROOVY-7914: ------------------------------------- Summary: 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 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 -- This message was sent by Atlassian JIRA (v6.3.4#6332)