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 4C3EE200CC0 for ; Sun, 9 Jul 2017 14:54:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4A98216AFCB; Sun, 9 Jul 2017 12:54:00 +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 8FBA716AF8E for ; Sun, 9 Jul 2017 14:53:59 +0200 (CEST) Received: (qmail 73033 invoked by uid 500); 9 Jul 2017 12:53:58 -0000 Mailing-List: contact dev-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list dev@openoffice.apache.org Received: (qmail 73022 invoked by uid 99); 9 Jul 2017 12:53:58 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jul 2017 12:53:58 +0000 Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 2863E1A0029 for ; Sun, 9 Jul 2017 12:53:58 +0000 (UTC) Received: by mail-lf0-f53.google.com with SMTP id z78so45264416lff.0 for ; Sun, 09 Jul 2017 05:53:58 -0700 (PDT) X-Gm-Message-State: AIVw112jpzPcnpeuh0M7q8/Wk1dSJT9p0+Y6mZE5gW/gNLx5ZFAXi1yv MkNbZzQOcZYg5+V1NeQb19lT3lewnA== X-Received: by 10.46.32.157 with SMTP id g29mr3284181lji.27.1499604836603; Sun, 09 Jul 2017 05:53:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.77.8 with HTTP; Sun, 9 Jul 2017 05:53:36 -0700 (PDT) From: Damjan Jovanovic Date: Sun, 9 Jul 2017 14:53:36 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Increase minimum Java version from 5 to 7/8 ? To: Apache OO Content-Type: multipart/alternative; boundary="001a1142c57c96da6f0553e1f5b8" archived-at: Sun, 09 Jul 2017 12:54:00 -0000 --001a1142c57c96da6f0553e1f5b8 Content-Type: text/plain; charset="UTF-8" Hi Currently our Java policy [1] mandates a baseline of Java 5, which was released in 2004, and was EOL from 2008; even paid Oracle customers stopped getting updates in 2015 [2]. There are many language and class library improvements in later versions of Java that we would benefit from in AOO, and if there are no objections, I would like to increase the minimum version to 7, if not 8. Java 7 would give us the badly needed try-with-resources feature, better type inference for generics, and Java 8: lambdas and method references, better java.util collections and lambda-based APIs for them, unsigned integer arithmetic, etc. The only possible downside I see is that the few alternative JVMs that do exist, tend to only work with older version of Java, for example, the Apache Harmony class library used in earlier versions of Android only supported Java 5, GNU Classpath also 5, CacaoVM only supports 6 [3]. Alternative Java implementation aren't relevant to desktop users (x86/amd64/sparc) any more, since OpenJDK provides free/open-source JVMs for those, but other platforms and more exotic use cases do need them, eg. the ARM JVM is only available from Oracle as a commercial product, and the BugVM project that compiles Java to native code for the iPhone, uses the Harmony-based Android library. Having said that, there are ways to compile most Java 7 code into Java 5 classes. For example try-with-resources compiles into a normal try-catch-finally, with calls to the Exception.addSuppressed() API that only exists on Java 7, but the class file can be changed to eliminate them; I already have a tool that does this. So I guess it's only 8 that's controversial, as it's lambdas compile into "invokevirtual" instructions, which didn't exist prior to Java 7. Anyway I am proceeding with (uncommitted) development under the assumption at least 7 is ok, and will revisit with 8 if possible. Please object soon if you do :-). Damjan References: [1] https://wiki.openoffice.org/wiki/Policies/Java_Usage [2] https://en.wikipedia.org/wiki/Java_version_history [3] https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines --001a1142c57c96da6f0553e1f5b8--