IQSS / IQSS/dataverse

Refactor BundleUtil to allow varargs

Open
#7,655 0 comments 0 reactions 0 assignees View on GitHub

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 BundleUtil might benefit from some minor tweaks, too.

The codebase should reflect the changes by removing all the noisy Arrays.asList().

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.