Refactor BundleUtil to allow varargs
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Lots of code uses Arrays.asList() to pass even single arguments to BundleUtil.getStringFromBundle().
- This should be changed to use a vararg to reduce boilerplate/noise. (The underlying Java classes use varargs, so it can simply be passed along)
- A new variant accepting a List should be provided allowing for backward compatibility and uses cases with iterators.
- The other functions in
BundleUtilmight benefit from some minor tweaks, too.
The codebase should reflect the changes by removing all the noisy Arrays.asList().
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at BundleUtil and search the codebase for calls to getStringFromBundle() that use Arrays.asList(). Review the existing BundleUtil functions and their callers, including iterator-based cases, before deciding the compatible API shape. Done means the varargs and List use cases work and the noisy Arrays.asList() calls have been removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100