[TRNSPRTPCE-661] Replace ArrayList instanciation by immutable lists when possible Created: 02/May/22 Updated: 20/Sep/23 Resolved: 03/May/22 |
|
| Status: | Verified |
| Project: | transportpce |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Phosphorus |
| Type: | Bug | Priority: | Medium |
| Reporter: | Gilles Thouenon | Assignee: | Gilles Thouenon |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0 minutes | ||
| Time Spent: | 1 day | ||
| Original Estimate: | 0 minutes | ||
| Description |
|
This is all the more true when ArrayList instantiation uses kind of anonymous class to its initialization, and that no new entries need to be added. In such a case, the use of immutable list with List.of() is particularly adequat. |