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 2021/02/03 15:15:00 UTC

[jira] [Work logged] (COLLECTIONS-781) INDEX_NOT_FOUND Constant

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

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

                Author: ASF GitHub Bot
            Created on: 03/Feb/21 15:14
            Start Date: 03/Feb/21 15:14
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on a change in pull request #210:
URL: https://github.com/apache/commons-collections/pull/210#discussion_r569495027



##########
File path: src/main/java/org/apache/commons/collections4/ListUtils.java
##########
@@ -539,7 +538,7 @@ public static int hashCodeForList(final Collection<?> list) {
                 }
             }
         }
-        return -1;
+        return ArrayUtils.INDEX_NOT_FOUND;

Review comment:
       Hi @arturobernalg 
   
   I think you can replace `ArrayUtils.INDEX_NOT_FOUND` with `CollectionUtils.INDEX_NOT_FOUND` and delete `ArrayUtils.INDEX_NOT_FOUND` since it is package private. Just make sure you use a better comment for `CollectionUtils.INDEX_NOT_FOUND` like the one for `ArrayUtils.INDEX_NOT_FOUND`.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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

> INDEX_NOT_FOUND Constant
> ------------------------
>
>                 Key: COLLECTIONS-781
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-781
>             Project: Commons Collections
>          Issue Type: Improvement
>            Reporter: Arturo Bernal
>            Priority: Minor
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The idea it's create a constant that represent that the Index to search it's not found



--
This message was sent by Atlassian Jira
(v8.3.4#803005)