Sebastian Götz created COLLECTIONS-874:
------------------------------------------

             Summary: Maputils.getLongValue actually returns a byte
                 Key: COLLECTIONS-874
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-874
             Project: Commons Collections
          Issue Type: Bug
          Components: Map
    Affects Versions: 4.5.0
            Reporter: Sebastian Götz


When using the following method
{code:java}
org.apache.commons.collections4.MapUtils.getLongValue(Map<? super K, ?>, K, 
Function<K, Long>)
{code}
the resulting value no matter if it is the value returned by the 
defaultFunction or the value contained in the map is returned as byte:

{code:java}
return applyDefaultFunction(map, key, MapUtils::getLong, defaultFunction, 
0L).byteValue();
{code}

The problem ist the final call to {{byteValue()}}.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to