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 <nbas...@bol.com>
Date:   2016-11-22T16:23:18Z

    AVRO-1961: Java: Generate getters that return a Java 8 Optional.

commit 99b6adaa4407bdf02c893ab655ae514ccaf57f9b
Author: Niels Basjes <nbas...@bol.com>
Date:   2016-11-23T10:27:37Z

    AVRO-1961: Upgrade docker to jdk 8

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to