From dev-return-7231-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Wed Jan 6 05:30:59 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id B633A18066B for ; Wed, 6 Jan 2021 06:30:59 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 008DA4489D for ; Wed, 6 Jan 2021 05:30:58 +0000 (UTC) Received: (qmail 59077 invoked by uid 500); 6 Jan 2021 05:30:58 -0000 Mailing-List: contact dev-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 dev@groovy.apache.org Received: (qmail 59057 invoked by uid 99); 6 Jan 2021 05:30:57 -0000 Received: from spamproc1-he-de.apache.org (HELO spamproc1-he-de.apache.org) (116.203.196.100) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2021 05:30:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-de.apache.org (ASF Mail Server at spamproc1-he-de.apache.org) with ESMTP id AFB9E1FF3A2 for ; Wed, 6 Jan 2021 05:30:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-de.apache.org X-Spam-Flag: NO X-Spam-Score: 2.998 X-Spam-Level: ** X-Spam-Status: No, score=2.998 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENA_SUBJ_ODD_CASE=3.2, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamproc1-he-de.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([116.203.227.195]) by localhost (spamproc1-he-de.apache.org [116.203.196.100]) (amavisd-new, port 10024) with ESMTP id CogqFL4G_FA2 for ; Wed, 6 Jan 2021 05:30:56 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.47; helo=mail-wr1-f47.google.com; envelope-from=chrylis@gmail.com; receiver= Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id D19B9BCD31 for ; Wed, 6 Jan 2021 05:30:55 +0000 (UTC) Received: by mail-wr1-f47.google.com with SMTP id 91so1307459wrj.7 for ; Tue, 05 Jan 2021 21:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Ta9LcyXcUFYGqUkmstHtwP1OlzbR3UrmI5uQ4kkd5uk=; b=SWGaKN2WffD5SLqWNYwJKlwtxqThiUB2+mnFCICqRj0QpNl+ccWM7iJXrq4zrBd3Gj Uc20fZ16c4PHpva2+6jgzJ9K1/woDV1WSzP2krwLd/p+ZSBiMckyOC4pSzV03cM9ztjw tA4UWI37Jc5Kg/4n3Wgs8SRCWc3eEHMpAR2C1f+DQx/UhMVnHCxBmxqRMk+4/2skmZNi vFqIEXhdT8ulSInvKV29Cp5jZJuzwfKhFNrnkGe0nscmFb/XaDe3pGHA2XXhgDX/uekX ZBdwTqGfpw4bofT4HcxnVNpk6XWJqAqwoE8S42ZpxyjrhlW/0GCuLGv8HH0qVnaDqKby 42uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ta9LcyXcUFYGqUkmstHtwP1OlzbR3UrmI5uQ4kkd5uk=; b=Ykw2v7vUXs8vzmh6kbro0EXiKcSoBMo7Z+ffIjVj9sU6y4+JTLDAvEmOagMw7dOTGW qX6GsaeAtjLBGc32r8qDLAHi5xVTmU0GjpvNAl9dgWbfxCuWuItr4beZPEZc2MmkJBaU W1csYrIwYcjjIxG6/+5P7d0NgYFMyi/k6Zl1kIiDFBYT7VdyJ/2qFy8yliDS4WiUf+c5 mC0WdTblxFwa8UtXeEVJAmlTRXyY6ye2IeCotbheL5PM1m6kfKyq2+W69yGCWJDFUynL yh8gGHk0jJMFQsJTYKRzj2QKJSoDrTSacA0m6wTvl7qeOoZ1ejzKTc8zmr9G2CMW1x4d D1Jw== X-Gm-Message-State: AOAM530+fIf/Fxu3VcJqjSBmiqVXdVfoBRVBbwuY88nA6Xkpo+VNM3fl +Gd2DbnctyxU9H6r4wFwdxDNOvMfMCu1yDN/ESYCAuv6mPsP6Q== X-Google-Smtp-Source: ABdhPJwuoTS63aOe66ktIjbmdi9d5yWNbxhK1X6g9wL9WBAEvuakGc/Zxsnsck4VtfQKYWIbTvqmCFhRYlunfMjB5/M= X-Received: by 2002:adf:e410:: with SMTP id g16mr2531102wrm.364.1609911054826; Tue, 05 Jan 2021 21:30:54 -0800 (PST) MIME-Version: 1.0 From: Christopher Smith Date: Tue, 5 Jan 2021 23:30:44 -0600 Message-ID: Subject: Proposal: Change behavior of AST getMemberClassValue() and equivalents To: dev@groovy.apache.org Content-Type: text/plain; charset="UTF-8" Currently, the method AbstractASTTransformation#getMemberClassValue takes as a parameter a "default value" (parameter defaulted to null), which is returned if the annotation instance does not provide a value for that parameter. This means that if an annotation is declared with a "default Foo.class", that expected default value is not taken into account, and the value returned to AST transformations is null. As the core structure of annotations provides for setting a default, it is exceedingly surprising for the default not to be respected and to have to be manually resolved by any transformation using it. I propose that as a breaking change for 4.0, if an annotation provides a default value and an instance of the annotation does not override that value, then that default value should be returned by the getMember*Value methods.