Skip to content

Fix issue #761 - #920

Merged
iluwatar merged 1 commit into
iluwatar:masterfrom
Azureyjt:master
Sep 7, 2019
Merged

iluwatar merged 1 commit into
iluwatar:masterfrom
Azureyjt:master

Conversation

@Azureyjt

@Azureyjt Azureyjt commented Sep 5, 2019

Copy link
Copy Markdown
Contributor

This PR solves issue #761

  • Add a flag to record whether the constructor is invoked for the first time. If not, throw corresponding exception.
  • Add test case to test creating new instance by reflection.

…ing by Reflection call will be successful if you do that firstly
@iluwatar iluwatar self-assigned this Sep 7, 2019
@iluwatar iluwatar added this to the 1.21.0 milestone Sep 7, 2019
@iluwatar
iluwatar merged commit f141033 into iluwatar:master Sep 7, 2019
@iluwatar

iluwatar commented Sep 7, 2019

Copy link
Copy Markdown
Owner

Thanks @Azureyjt for this fix 👍

@DeclanWang

Copy link
Copy Markdown

I think this just guarantee that the private constructor will only be invoked once but still can't prevent initiation via Reflection at the first time, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants