Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Add support for generating getters that return Optional #90

Merged
merged 2 commits into from
Oct 17, 2019
Merged

Add support for generating getters that return Optional #90

merged 2 commits into from
Oct 17, 2019

Conversation

bspeakmon
Copy link

This change adds support for the createOptionalGetters and gettersReturnOptional properties in SpecificCompiler, new as of Avro 1.9.

createOptionalGetters adds additional methods of the form Optional<sometype> getOptionalField() for each field.

gettersReturnOptional changes getters to return Optional, as in Optional<sometype> getField().

@davidmc24
Copy link
Owner

davidmc24 commented Oct 17, 2019 via email

Copy link
Owner

@davidmc24 davidmc24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull requests for features added in recent versions are awesome, since other people often notice these feature before I do, and they're things that usually clearly make sense to support in the plugin.

The things I generally look for in this type of review are:

  • if there's any version compatibility impact
  • if it's properly included in the documentation (readme, changelog)
  • if it has adequate test coverage
  • if the defaults are appropriate (match avro library's default handling and/or most common usage)
  • if the naming matches the avro library
  • if the extension and conventions are wired up properly
  • matches existing conventions for plugin logging output
  • correct usage of Input/Output

Man, listing all that makes Gradle plugin development sound complicated.

Regardless, you did great with this pull request. I'm going to merge it. I've got a couple minor changes I'm planning on making in the next week or so, and then I'll include this in the next release.

Thanks again for the pull request!

@davidmc24 davidmc24 merged commit 1d5674a into davidmc24:master Oct 17, 2019
@bspeakmon bspeakmon deleted the feature/add-optional-type-support branch October 17, 2019 02:04
@davidmc24 davidmc24 added this to the 0.18.0 milestone Feb 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants