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 33AA8200BD5 for ; Wed, 23 Nov 2016 11:55:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3240C160AFA; Wed, 23 Nov 2016 10:55: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 78E93160AFD for ; Wed, 23 Nov 2016 11:54:59 +0100 (CET) Received: (qmail 40713 invoked by uid 500); 23 Nov 2016 10:54:58 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 40702 invoked by uid 99); 23 Nov 2016 10:54:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2016 10:54:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 634B32C03E0 for ; Wed, 23 Nov 2016 10:54:58 +0000 (UTC) Date: Wed, 23 Nov 2016 10:54:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-1961) [JAVA] Generate getters that return an Optional MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 23 Nov 2016 10:55:00 -0000 [ https://issues.apache.org/jira/browse/AVRO-1961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15689744#comment-15689744 ] ASF GitHub Bot commented on AVRO-1961: -------------------------------------- GitHub user nielsbasjes opened a pull request: https://github.com/apache/avro/pull/162 AVRO-1961: Java: Generate getters that return a Java 8 Optional. NOTE: This must wait until AFTER the release of Avro 1.8.2. This is a first attempt at making the Java code generator have the option (default is off) to generate Java 8 Optional getters. A few things about this that open and must be discussed before committing: 1. This will change the building of Avro to require JDK 8 to be installed. Building with JDK 7 will simply fail. 2. The main runtime is still compiled with the setting "JDK 6". So in theory that should remain backward compatible for systems that still rely in JDK 6. 3. This is my first time playing with Optionals so a thorough review is really needed. Also a big question is: Do we want this? I think it is a good idea to use the new Java features that make it easier for downstream developers. Yet the risk of breaking backward compatibility may be considered to be a problem. You can merge this pull request into a Git repository by running: $ git pull https://github.com/nielsbasjes/avro AVRO-1961 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/avro/pull/162.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 #162 ---- commit 2394bcf5f7abfd38239bdafd7f30666cc3bfc32a Author: Niels Basjes Date: 2016-11-22T16:23:18Z AVRO-1961: Java: Generate getters that return a Java 8 Optional. commit 99b6adaa4407bdf02c893ab655ae514ccaf57f9b Author: Niels Basjes Date: 2016-11-23T10:27:37Z AVRO-1961: Upgrade docker to jdk 8 ---- > [JAVA] Generate getters that return an Optional > ----------------------------------------------- > > Key: AVRO-1961 > URL: https://issues.apache.org/jira/browse/AVRO-1961 > Project: Avro > Issue Type: New Feature > Reporter: Niels Basjes > Assignee: Niels Basjes > Priority: Minor > > A colleague of mine indicated that having getters that return an Optional (java 8 thingy) would be very useful for him. -- This message was sent by Atlassian JIRA (v6.3.4#6332)