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

Respect call sequence of builder-based with-method and a standard with-method #75

Closed
mkarneim opened this issue Sep 15, 2014 · 0 comments
Labels

Comments

@mkarneim
Copy link
Owner

The sequence of calling a builder-based with-method and a standard with-method for the same property should be respected.

For example: when calling

builder.withName( new Builder<String>() {
  public String build() {
    return "other name";
  }
});
builder.withName( "some name");
Pojo p = builder.build();

I get the expected result: p.getName() returns "some name", which is fine.

When I change the call sequence to the following:

builder.withName( "some name");
builder.withName( new Builder<String>() {
  public String build() {
    return "other name";
  }
});
Pojo p = builder.build();

I would expect p.getName() to return "other name", but I get "some name".

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

1 participant