Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

Eagerly initialize to-n ArrayLists #16

@Clashsoft

Description

@Clashsoft

We can do away with the to-n association and attribute backing lists being nullable, and declare it initialized from the start:

private final java.util.ArrayList<Student> students = new java.util.ArrayList<>();

ArrayList creation is cheap, it does not even instantiate a backing array until the first element is added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementChanges to existing featuressuggestionOptional changes

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions