Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Collection properties as mutable types

Open
#379 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
tooling

Research direction

Start by tracing ListProperty and SettingsManager, especially how defaults and current values are returned and stored. Compare the proposed always-mutable current value with the alternative helper API and check related collection-property behavior. Done requires a maintainer-approved design and tests showing default values remain immutable while current collection values support mutation.

Written by the indexing model from the issue text.

Description

architecture

I think it makes sense to have default values of list properties, set properties and similar immutable, but it's a bit cumbersome to have to work around the current value being immutable whenever we want to add or remove a value. It might make sense to just always hold the default value as mutable (i.e. by copying the default value over into an ArrayList or similar when it's not in the resource), or by providing a method that redefines the list to be mutable if needed (for ListProperty):

    public List<E> getOrInitAsMutableList(@NotNull SettingsManager settingsManager) {
        List<E> value = settingsManager.getProperty(this);
        if (value.getClass() != ArrayList.class) {
            value = new ArrayList<>(value);
            settingsManager.setProperty(this, value);
        }
        return value;
    }

I think ideally we have the default value immutable, the current value always mutable. I don't think the performance impact of copying over entries should be noticeable.

Dominant language
Java
Stars
44
Forks
21
Avg merge
7d 11h
Merged PRs (30d)
2

Getting set up

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.

More from AuthMe/ConfigMe

All issues in AuthMe/ConfigMe

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.