Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties using Optional should have the type: Optional<? extends Type> #123

Closed
Adrodoc opened this issue Oct 24, 2016 · 1 comment
Closed
Labels

Comments

@Adrodoc
Copy link
Contributor

Adrodoc commented Oct 24, 2016

For example, the generated builder for the following pojo is not correct:

@GeneratePojoBuilder(withOptionalProperties = Optional.class)
public class Pojo {
  public Number value;
}

The optional-with-method "withValue" should have the following signature:
public PojoBuilder withValue(Optional<? extends Number> value)

but has:
public PojoBuilder withValue(Optional<Number> value)

This is similar to #115

@mkarneim
Copy link
Owner

Nice!

mkarneim added a commit that referenced this issue Oct 25, 2016
Use '? extends Type' for properties using optional. Fixes #123
@mkarneim mkarneim added the Bug label Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants