google / google/error-prone

ImmutableEnumChecker on a list coming from List.of(...) which is immutable

Open
#1,542 12 comments 7 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

### Description of the problem / feature request:

I'm getting `ImmutableEnumChecker` errors on such enum:

```
public enum SomeEnum {

SOME_VALUE(List.of(TYPE_1, TYPE_2))

public final List types;

SomeEnum(List types) {
this.types = types;
}
}
```

ErrorProne should not trigger `ImmutableEnumChecker` on collections created from `ImmutableCollections`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.