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

consolidate code: parseMethods + ParseResources #123

Open
vchudnov-g opened this issue Apr 8, 2024 · 0 comments
Open

consolidate code: parseMethods + ParseResources #123

vchudnov-g opened this issue Apr 8, 2024 · 0 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@vchudnov-g
Copy link
Collaborator

parseResources and parseMethods appear to have essentially identical code that only differs in what is returned. For clarity and to reduce duplication, consider combining the two.

One idea is to pass in a lambda to a common function that can be used to call resources.put or methods.addAll; the latter can be the default if no lambda is provided, since it is the recursive case.

@vchudnov-g vchudnov-g added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern. priority: p3 Desirable enhancement or fix. May not be included in next release. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant