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 7A5AD200CDB for ; Sat, 5 Aug 2017 23:14:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 78F0A164DD7; Sat, 5 Aug 2017 21:14:08 +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 BAC8D164DD8 for ; Sat, 5 Aug 2017 23:14:07 +0200 (CEST) Received: (qmail 68087 invoked by uid 500); 5 Aug 2017 21:14:07 -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 68078 invoked by uid 99); 5 Aug 2017 21:14:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Aug 2017 21:14:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6AEAEC314C for ; Sat, 5 Aug 2017 21:14:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Zxns2LU0ACrm for ; Sat, 5 Aug 2017 21:14:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 69AAF5F6C2 for ; Sat, 5 Aug 2017 21:14:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F19DDE0D5B for ; Sat, 5 Aug 2017 21:14:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id F020524161 for ; Sat, 5 Aug 2017 21:14:01 +0000 (UTC) Date: Sat, 5 Aug 2017 21:14:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-8242) Javadoc for Newify is missing some attribute values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 05 Aug 2017 21:14:08 -0000 [ https://issues.apache.org/jira/browse/GROOVY-8242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115516#comment-16115516 ] ASF GitHub Bot commented on GROOVY-8242: ---------------------------------------- GitHub user jwagenleitner opened a pull request: https://github.com/apache/groovy/pull/579 GROOVY-8242: @Newify default attribute value Class values are only required for Python-style conversions so the attribute should default to an empty array to indicate it is not strictly required. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jwagenleitner/groovy 8242-Newify-value-default Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/579.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #579 ---- commit e68a7c7ca60e9c6453565bbb91720dfe6479567c Author: John Wagenleitner Date: 2017-08-05T18:05:17Z GROOVY-8242: @Newify default attribute value Class values are only required for Python-style conversions so the attribute should default to an empty array to indicate it is not strictly required. ---- > Javadoc for Newify is missing some attribute values > --------------------------------------------------- > > Key: GROOVY-8242 > URL: https://issues.apache.org/jira/browse/GROOVY-8242 > Project: Groovy > Issue Type: Bug > Reporter: Eric Milles > Priority: Minor > > I was looking at thw Newify AST transform. Some of the Javadoc appears incorrect since the annotation requires a value. > {code} > * or this ("Ruby-style"): > *
>  * {@code @Newify} class MyTreeProcessor {  --  Is this supposed to be @Newify([Tree,Leaf])?
>  *     def myTree = Tree.new(Tree.new(Leaf.new("A"), Leaf.new("B")), Leaf.new("C"))
>  *     def process() { ... }
>  * }
>  * 
> {code} > {code} > * An example showing how to use the annotation at different levels: > *
>  * {@code @Newify(auto=false, value=Foo)}
>  * class Main {
>  *     {@code @Newify} // turn auto on for field  --  Is this supposed to be @Newify(BigInteger)?
>  *     def field1 = java.math.BigInteger.new(42)
>  *     def field2, field3, field4
>  *
>  *     {@code @Newify(Bar)}
>  *     def process() {
>  *         field2 = Bar("my bar")
>  *     }
>  *
>  *     {@code @Newify(Baz)}
>  *     Main() {
>  *         field3 = Foo("my foo")
>  *         field4 = Baz("my baz")
>  *     }
>  * }
>  * 
> {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)