You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/04/22 06:37:00 UTC

[jira] [Work logged] (COLLECTIONS-799) UnmodifiableNavigableSet can be modified by pollFirst() and pollLast()

     [ https://issues.apache.org/jira/browse/COLLECTIONS-799?focusedWorklogId=760639&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-760639 ]

ASF GitHub Bot logged work on COLLECTIONS-799:
----------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Apr/22 06:36
            Start Date: 22/Apr/22 06:36
    Worklog Time Spent: 10m 
      Work Description: scordio commented on PR #250:
URL: https://github.com/apache/commons-collections/pull/250#issuecomment-1106061634

   Hi @kinow and @garydgregory, anything I could do to help get this released?




Issue Time Tracking
-------------------

    Worklog Id:     (was: 760639)
    Time Spent: 2h  (was: 1h 50m)

> UnmodifiableNavigableSet can be modified by pollFirst() and pollLast()
> ----------------------------------------------------------------------
>
>                 Key: COLLECTIONS-799
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-799
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Collection, Set
>    Affects Versions: 4.4
>            Reporter: Stefano Cordio
>            Assignee: Bruno P. Kinoshita
>            Priority: Major
>             Fix For: 4.5
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> [{{pollFirst()}}|https://docs.oracle.com/javase/7/docs/api/java/util/NavigableSet.html#pollFirst()] and [{{pollLast()}}|https://docs.oracle.com/javase/7/docs/api/java/util/NavigableSet.html#pollLast()] are successfully executed and do not throw an {{UnsupportedOperationException}} on an {{UnmodifiableNavigableSet}} instance.
> In my opinion, {{org.apache.commons.collections4.set.UnmodifiableNavigableSet}} should have an implementation similar to {{java.util.Collections.UnmodifiableNavigableSet}}, where both methods throw an {{UnsupportedOperationException}}: https://github.com/openjdk/jdk/blob/708407eddc9d52c01de02e3986c05e1c6225fa85/src/java.base/share/classes/java/util/Collections.java#L1278-L1279
> This was detected during working on https://github.com/assertj/assertj-core/pull/2328.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)