mkarneim / pojobuilder

A Java Code Generator for Pojo Builders
Other
334 stars 44 forks source link

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

Closed Adrodoc closed 8 years ago

Adrodoc commented 8 years ago

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 commented 8 years ago

Nice!