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

Add PropertyReader extension for key methods #372

Open
ljacqu opened this issue Sep 2, 2023 · 0 comments
Open

Add PropertyReader extension for key methods #372

ljacqu opened this issue Sep 2, 2023 · 0 comments
Labels
architecture Difficult architectural questions
Milestone

Comments

@ljacqu
Copy link
Member

ljacqu commented Sep 2, 2023

Not sure about this one yet, but on PropertyReader: getKeys and getChildKeys is not used by ConfigMe, and I've been throwing UnsupportedOperationException in custom reader implementations I've created. It might be nicer to introduce an extension to PropertyReader and have the existing YamlFileReader implement it, so that whoever needs the child keys can get them, without having to create the methods if they're not of interest. ConfigMe doesn't need them anywhere.

Interestingly, with the new property type implementations, we don't need any methods except contains and getObject. The question is whether we should also drop getBoolean and friends, or provide default methods for them... I think keeping the methods is not so bad, since they're useful in the migration service. Then again, the best way to get old values from the reader is to create a new Property in the method and to extract values like that.

@ljacqu ljacqu added the architecture Difficult architectural questions label Sep 2, 2023
@ljacqu ljacqu added this to the 2.0.0 milestone Sep 2, 2023
@ljacqu ljacqu changed the title Add PropertyReader for key methods Add PropertyReader extension for key methods Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Difficult architectural questions
Development

No branches or pull requests

1 participant