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

Eric Milles resolved GROOVY-10120.
----------------------------------
    Fix Version/s: 5.0.0-alpha-1
       Resolution: Fixed

https://github.com/apache/groovy/commit/f09ea218d6bf0e03c6a4112b29b1ef67b16b501e

> STC: Guava Multimap#asMap bridge method
> ---------------------------------------
>
>                 Key: GROOVY-10120
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10120
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.0, 3.0.5
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 5.0.0-alpha-1
>
>
> Consider the following:
> {code:java}
> @Grab('com.google.guava:guava:30.1.1-jre')
> import com.google.common.collect.*
> @groovy.transform.TypeChecked
> void test() {
>     ListMultimap<String, Integer> mmap = ArrayListMultimap.create()
>     Map<String, Set<Integer>> map = mmap.asMap() // no STC error
>     // ...
> }
> {code}
> Due to the presence of multiple bridge methods in {{ArrayListMultimap}}, 
> generics checking of {{asMap()}} is currently lacking.  The following are all 
> bridge methods in {{ArrayListMultimap}} (30.1.1):
> {code}
> asMap()
> equals(Object)
> put(Object,Object)
> replaceValues(Object,Iterable)
> removeAll(Object)
> get(Object)
> forEach(BiConsumer)
> entries()
> values()
> clear()
> containsKey(Object)
> size()
> createCollection() // non-synthetic returns List not Collection
> toString()
> hashCode()
> keys()
> keySet()
> putAll(Multimap)
> putAll(Object,Iterable)
> remove(Object,Object)
> containsEntry(Object,Object)
> containsValue(Object)
> isEmpty()
> {code}



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

Reply via email to