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 B9C9B200CC2 for ; Wed, 5 Jul 2017 18:55:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B7EAA163DD3; Wed, 5 Jul 2017 16:55:27 +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 085B6163DCF for ; Wed, 5 Jul 2017 18:55:26 +0200 (CEST) Received: (qmail 88202 invoked by uid 500); 5 Jul 2017 16:55:26 -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 88192 invoked by uid 99); 5 Jul 2017 16:55:26 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2017 16:55:26 +0000 Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id EAAF31A0029 for ; Wed, 5 Jul 2017 16:55:24 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id t72so28465349lff.1 for ; Wed, 05 Jul 2017 09:55:24 -0700 (PDT) X-Gm-Message-State: AKS2vOzZW4/e3PdD1kJSO7hUrzMhwO6JsWVEzC4qA61Jg7FjJXs47ASm nntkHfntslhfrgahY7yE6yGxBgR6nA== X-Received: by 10.25.209.20 with SMTP id i20mr13418521lfg.41.1499273722997; Wed, 05 Jul 2017 09:55:22 -0700 (PDT) MIME-Version: 1.0 Reply-To: cchampeau@apache.org Received: by 10.46.22.8 with HTTP; Wed, 5 Jul 2017 09:55:22 -0700 (PDT) In-Reply-To: <1499272911.21698.16.camel@winder.org.uk> References: <1499272911.21698.16.camel@winder.org.uk> From: =?UTF-8?Q?C=C3=A9dric_Champeau?= Date: Wed, 5 Jul 2017 18:55:22 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: trySetAccessible for Java 9 To: Russel Winder Cc: dev@groovy.apache.org Content-Type: multipart/alternative; boundary="001a114009c8ae318f055394ddba" archived-at: Wed, 05 Jul 2017 16:55:27 -0000 --001a114009c8ae318f055394ddba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Actually I'm realizing that the `MethodHandle` API came with Java 7. So we _can_ compile against it. So I guess an option is to have the method handle redirect to `trySetAccessible` if the detected runtime is Java 9, and a backport method if < 9. 2017-07-05 18:41 GMT+02:00 Russel Winder : > On Wed, 2017-07-05 at 18:28 +0200, C=C3=A9dric Champeau wrote: > > > [=E2=80=A6] > > Any suggestion? > > How about leave Groovy 2.x as a "can only build on JDK8", and put all > effort > for a JDK9 build on Groovy 3.x which, as I understand it requires JDK8 as= a > runtime. This would seem to minimise hassle and maximise forward-looking > benefit. Unless I am missing something. > > -- > Russel. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Dr Russel Winder t:+44 20 7585 2200 voip:sip: > russel.winder@ekiga.net > 41 Buckmaster Road m:+44 7770 465 077 xmpp:russel@winder.org.uk > London SW11 1EN, UK w: www.russel.org.uk skype:russel_winder --001a114009c8ae318f055394ddba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Actually I'm realizing that the `MethodHandle` API cam= e with Java 7. So we _can_ compile against it. So I guess an option is to h= ave the method handle redirect to `trySetAccessible` if the detected runtim= e is Java 9, and a backport method if < 9.


=

2017-07-05 = 18:41 GMT+02:00 Russel Winder <russel@winder.org.uk>:
=
On Wed, 2017-07-05 at 18:28 +0200, C=C3=A9dr= ic Champeau wrote:
>
[=E2=80=A6]
> Any suggestion?

How about leave Groovy 2.x as a "can only build on JDK8", and put= all effort
for a JDK9 build on Groovy 3.x which, as I understand it requires JDK8 as a=
runtime. This would seem to minimise hassle and maximise forward-looking benefit. Unless I am missing something.

--
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
Dr Russel Winder=C2=A0 =C2=A0 =C2=A0t:+44 20 7585 2200=C2=A0 =C2=A0voip:sip:
russel.winder@ekiga.net
41 Buckmaster Road=C2=A0 =C2=A0m:+44 7770 465 077=C2=A0 =C2=A0xmpp:russel@winder.org.uk
London SW11 1EN, UK=C2=A0 w: www.russel.org.uk skype:russel_winder

--001a114009c8ae318f055394ddba--