maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MNG-6164) Collections inconsistently immutable
Date Thu, 25 May 2017 18:14:04 GMT

     [ https://issues.apache.org/jira/browse/MNG-6164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Osipov updated MNG-6164:
--------------------------------
    Summary: Collections inconsistently immutable  (was: Collections inconsistently immutable.)

> Collections inconsistently immutable
> ------------------------------------
>
>                 Key: MNG-6164
>                 URL: https://issues.apache.org/jira/browse/MNG-6164
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Christian Schulte
>            Assignee: Michael Osipov
>            Priority: Critical
>             Fix For: 3.5.1-candidate
>
>
> There are plenty of places where empty collections are returned from public API methods
like:
> {code}
>      public List<Exception> getExceptions()
>      {
>         return exceptions == null ? Collections.<Exception> emptyList() : exceptions;
>      }
> {code}
> The issue with this is that the empty list is immutable but the collection returned for
the nun-null case is not immutable. All those methods should return an immutable collection
consistently.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message