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

Constructor binding for nested class with multiple constructors causes BindException #18810

Closed
mbhave opened this issue Oct 30, 2019 · 3 comments
Labels
type: bug A general bug
Milestone

Comments

@mbhave
Copy link
Contributor

mbhave commented Oct 30, 2019

@ConstructorBinding
@ConfigurationProperties("test")
static class NestedConstructorProperties {

  private final String name;

  private final Nested nested;

  NestedConstructorProperties(String name, Nested nested) {
    this.name = name;
    this.nested = nested;
  }

  String getName() {
    return this.name;
  }

  Nested getNested() {
    return this.nested;
  }

  static class Nested { 

    private int age;

    @ConstructorBinding
    Nested(int age) {
      this.age = age;
    }

    Nested() {

    }

    int getAge() {
      return this.age;
    }

  }

}
@mbhave mbhave added the type: bug A general bug label Oct 30, 2019
@mbhave mbhave added this to the 2.2.x milestone Oct 30, 2019
@giovannilima262
Copy link

Which package has this note?

@mbhave
Copy link
Contributor Author

mbhave commented Oct 30, 2019

@giovannilima262 Sorry but I don't think I understood the question.

@giovannilima262
Copy link

Which project locations need to solve this problem?

@mbhave mbhave closed this as completed in f9785d2 Nov 5, 2019
@mbhave mbhave modified the milestones: 2.2.x, 2.2.1 Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants