Skip to content

issue 508 - using copy constructor to implement prototype. #709

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

Merged
merged 1 commit into from
Jan 28, 2018

Conversation

mookkiah
Copy link
Contributor

As per http://www.artima.com/intv/bloch13.html, clone method in java is
broken or confusing. So staying away from clone method.

SonarQube reports code smells #508

  • SonarQube recommends Remove this "clone" implementation; use a copy constructor or copy factory instead

Pull request description

  • introduced copy method which uses copy constructor. keeps the implementation transparent and expect developer to make deep copy during copy operation.

As per http://www.artima.com/intv/bloch13.html, clone method in java is
broken or confusing. So staying away from clone method.
@iluwatar iluwatar merged commit e7b119c into iluwatar:master Jan 28, 2018
@iluwatar
Copy link
Owner

Thanks @mookkiah for this fix! 👍

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