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

Binder could create instances even for classes without public default constructor #991

Closed
asolntsev opened this issue Jul 12, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@asolntsev
Copy link
Contributor

Sometimes we want to bind a class with play Binder, but leave its default constructor private or package-private, so that "normal" application code could not use it.

Like this:

public class Person {
  private Person() {
    // this should be used by Play Binder
  }

  public Person(String firstName, String lastName) {
    // this should be used by application code
  }
}
@asolntsev asolntsev self-assigned this Jul 12, 2016
@asolntsev asolntsev added this to the 1.4.3 milestone Jul 12, 2016
asolntsev added a commit that referenced this issue Jul 12, 2016
@asolntsev
Copy link
Contributor Author

done in branch 1.4.x

xael-fry pushed a commit to xael-fry/play that referenced this issue Oct 20, 2016
xael-fry pushed a commit to xael-fry/play that referenced this issue Oct 20, 2016
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