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 13002200B9C for ; Mon, 26 Sep 2016 02:38:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 11907160AE2; Mon, 26 Sep 2016 00:38: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 7ED8E160ACE for ; Mon, 26 Sep 2016 02:38:21 +0200 (CEST) Received: (qmail 80132 invoked by uid 500); 26 Sep 2016 00:38:20 -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 80119 invoked by uid 99); 26 Sep 2016 00:38:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2016 00:38:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 91F3D2C0057 for ; Mon, 26 Sep 2016 00:38:20 +0000 (UTC) Date: Mon, 26 Sep 2016 00:38:20 +0000 (UTC) From: "Henri Tremblay (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-7933) Incorrect boxing of boolean primitive types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Sep 2016 00:38:22 -0000 [ https://issues.apache.org/jira/browse/GROOVY-7933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15521683#comment-15521683 ] Henri Tremblay commented on GROOVY-7933: ---------------------------------------- Awesome. Thanks > Incorrect boxing of boolean primitive types > ------------------------------------------- > > Key: GROOVY-7933 > URL: https://issues.apache.org/jira/browse/GROOVY-7933 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime > Affects Versions: 2.4.7 > Reporter: Henri Tremblay > Assignee: John Wagenleitner > Fix For: 2.4.8 > > > A boolean primitive type seems to be boxed for no apparent reason. See the example below. The problem disappear when using @CompileStatic or if explicitly casting to (boolean). > {code:java} > public class Demo { > public void a(boolean a){ > System.out.println("boolean was called"); > } > public void a(Object a){ > System.out.println("Object was called"); > } > } > class Groovy { > static void main(String[] args) { > def demo = new Demo() > demo.a(true) > } > } > {code} > *Output:* > Object was called -- This message was sent by Atlassian JIRA (v6.3.4#6332)