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

Annotations on generic parameter types not copied to implementation #1205

Open
Randgalt opened this issue Jul 30, 2020 · 0 comments
Open

Annotations on generic parameter types not copied to implementation #1205

Randgalt opened this issue Jul 30, 2020 · 0 comments

Comments

@Randgalt
Copy link

Given:

import org.immutables.value.Value;

import javax.validation.constraints.NotEmpty;

import java.util.Optional;

@Value.Style(passAnnotations = NotEmpty.class)
@Value.Immutable
public interface Foo
{
    Optional<@NotEmpty String> value();
}

Immutables generates:

  /**
   * @return The value of the {@code value} attribute
   */
  @Override
  public Optional<String> value() {     // should be public Optional<@NotEmpty String> value();
    return Optional.ofNullable(value);
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant