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

ACCUMULO-1975 Refactor Property.createInstanceFromPropertyName into AccumuloConfiguration.instantiateClassProperty #351

Merged
merged 2 commits into from Jan 11, 2018

Conversation

jkrdev
Copy link
Contributor

@jkrdev jkrdev commented Dec 28, 2017

No description provided.

Copy link
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one in Property.java is actually the good one. A lot changed in this code since the original JIRA issue was created. Specifically, the ConfigurationTypeHelper class was created to assist converting String configuration values to specific types, and it was designed to properly fail if it a user-specified value was not able to be parsed. The one in AccumuloConfiguration.java suppresses exceptions silently, and could cause problems.

Instead of changing the existing code which calls Property.createInstanceFromPropertyName, the code which calls AccumuloConfiguration.instantiateClassProperty should be reviewed and modified to call the Property.createInstanceFromPropertyName, Property.createTableInstanceFromPropertyName, or another customized call to ConfigurationTypeHelper directly.

@jkrdev
Copy link
Contributor Author

jkrdev commented Dec 28, 2017

Oh ha okay I saw that Property.createInstanceFromPropertyName was only in 3 places so I just assumed. I will go through and review those.

…ariant, in locations where instantiateClassProperty was used.
@jkrdev
Copy link
Contributor Author

jkrdev commented Jan 4, 2018

I believe I have replaced all the code in the appropriate places as well as removed AccumuloConfiguration.instantiateClassProperty method from the class.

@ctubbsii ctubbsii merged commit 13619d5 into apache:master Jan 11, 2018
@jkrdev jkrdev deleted the ACCUMULO-1975 branch January 12, 2018 14:45
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

Successfully merging this pull request may close these issues.

None yet

2 participants