[jira] [Assigned] (MNG-6164) Collections inconsistently immutable

2018-10-09 Thread Michael Osipov (JIRA)


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

Michael Osipov reassigned MNG-6164:
---

Assignee: Michael Osipov  (was: Karl Heinz Marbaise)

> Collections inconsistently immutable
> 
>
> Key: MNG-6164
> URL: https://issues.apache.org/jira/browse/MNG-6164
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.5.0
>Reporter: Christian Schulte
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.6.0
>
>
> There are plenty of places where empty collections are returned from public 
> API in methods written like:
> {code}
>  public List getExceptions()
>  {
> return exceptions == null ? Collections.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 a collection with consistent "mutability": 
> either mutable, either immutable.
> Given empty immutable collections do not cause harm until now, switching 
> consistently to immutable collections is more conservative and should not be 
> risky



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (MNG-6164) Collections inconsistently immutable

2018-02-18 Thread Michael Osipov (JIRA)

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

Michael Osipov reassigned MNG-6164:
---

Assignee: Karl Heinz Marbaise  (was: Michael Osipov)

> Collections inconsistently immutable
> 
>
> Key: MNG-6164
> URL: https://issues.apache.org/jira/browse/MNG-6164
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.5.0
>Reporter: Christian Schulte
>Assignee: Karl Heinz Marbaise
>Priority: Minor
> Fix For: 3.6.0-candidate
>
>
> There are plenty of places where empty collections are returned from public 
> API in methods written like:
> {code}
>  public List getExceptions()
>  {
> return exceptions == null ? Collections.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 a collection with consistent "mutability": 
> either mutable, either immutable.
> Given empty immutable collections do not cause harm until now, switching 
> consistently to immutable collections is more conservative and should not be 
> risky



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (MNG-6164) Collections inconsistently immutable.

2017-05-25 Thread Michael Osipov (JIRA)

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

Michael Osipov reassigned MNG-6164:
---

Assignee: Michael Osipov

> 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 getExceptions()
>  {
> return exceptions == null ? Collections. 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)


[jira] [Assigned] (MNG-6164) Collections inconsistently immutable.

2017-03-25 Thread Christian Schulte (JIRA)

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

Christian Schulte reassigned MNG-6164:
--

Assignee: (was: Christian Schulte)

> Collections inconsistently immutable.
> -
>
> Key: MNG-6164
> URL: https://issues.apache.org/jira/browse/MNG-6164
> Project: Maven
>  Issue Type: Bug
>Reporter: Christian Schulte
>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 getExceptions()
>  {
> return exceptions == null ? Collections. 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)