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

initialization behavior with MutablePersonWrapperBuilder #393

Closed
shawkins opened this issue Jun 21, 2023 · 0 comments
Closed

initialization behavior with MutablePersonWrapperBuilder #393

shawkins opened this issue Jun 21, 2023 · 0 comments

Comments

@shawkins
Copy link
Collaborator

This class looks like:

public MutablePersonWrapperBuilder(MutablePersonWrapper instance,Boolean validationEnabled) {
    this.fluent = this; 
    if (instance != null) {
    }
    this.validationEnabled = validationEnabled; 
  }
  MutablePersonWrapperFluent<?> fluent;
  Boolean validationEnabled;
  public EditableMutablePersonWrapper build() {
    EditableMutablePersonWrapper buildable = new EditableMutablePersonWrapper();
    buildable.setItem(fluent.buildItem());
    return buildable;
  }

There's no attempt to initialize the builder item when the instance is not null. This behavior is not new, in .94 it looked like:

  public MutablePersonWrapperBuilder(MutablePersonWrapper instance,Boolean validationEnabled) {
    this.fluent = this; 
    this.validationEnabled = validationEnabled; 
  }

Shouldn't there be an attempt to call withItem(instance.getItem())?

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