[Inspection Gadgets] Return of Collection or Array Field


I sometimes have the following code:

private List alertLevels = new ArrayList();
private final List umAlertLevels = Collections.unmodifiableList(
alertLevels );

public List getAlertLevels() {
return umAlertLevels;

the return of "umAlertLevels" is reported as return of collection or
array field.
I don't want to supress every warning in those cases, so I would be glad
if the intention could be extended to find such constellations.

Johannes Schneider

1 comment
Comment actions Permalink

Reasonable. Please submit a JIRA request.

--Dave Griffith


Please sign in to leave a comment.