Guava 18 won't compile with GWT 2.8Snapshot and Java 8

I am using in my module gwt.xml and put

guava-18.0.jar
guava-gwt-18.0.jar

   Tracing compile failure path for type 'com.google.common.collect.Collections2'
      [ERROR] Errors in 'com/google/common/collect/Collections2.java'
         [ERROR] Line 201: The method and(Predicate<capture#14-of ? super E>, Predicate<capture#15-of ?>) is undefined for the type Collections2.FilteredCollection<E>
         [ERROR] Line 206: The method and(Predicate<capture#16-of ? super E>, Predicate<capture#17-of ?>) is undefined for the type Collections2.FilteredCollection<E>
   Tracing compile failure path for type 'com.google.common.collect.Maps'
      [ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/Maps.java'
         [ERROR] Line 2244: The method and(Predicate<capture#263-of ? super Map.Entry<K,V>>, Predicate<capture#264-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
         [ERROR] Line 2343: The method and(Predicate<capture#265-of ? super Map.Entry<K,V>>, Predicate<capture#266-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
   Tracing compile failure path for type 'com.google.common.collect.Multimaps'
      [ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/Multimaps.java'
         [ERROR] Line 1691: The method and(Predicate<capture#83-of ? super K>, Predicate<capture#84-of ? super K>) is undefined for the type Predicates
         [ERROR] Line 1954: The method and(Predicate<capture#105-of ? super Map.Entry<K,V>>, Predicate<capture#106-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
         [ERROR] Line 1735: The method and(Predicate<capture#87-of ? super K>, Predicate<capture#88-of ? super K>) is undefined for the type Predicates
         [ERROR] Line 1779: The method and(Predicate<capture#91-of ? super K>, Predicate<capture#92-of ? super K>) is undefined for the type Predicates
         [ERROR] Line 1940: The method and(Predicate<capture#103-of ? super Map.Entry<K,V>>, Predicate<capture#104-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
   [ERROR] Aborting compile due to errors in some input files

      

Edit: The google group GWT-Contributors is discussed: https://groups.google.com/forum/#!topic/google-web-toolkit-contributors/zYUfanL8zwM

Here is the issue for this issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=9036

Is there a workaround for this problem?

Edit: I tested with Guava 19SNAPSHOT and got the same error.

+3


source to share


1 answer


This is a known issue with GWT and the version of the JDT used.

The fix reported in the bug report is to update the jdt version, run update-jdt.py, and update dev / build.xml to point to the new version.



Alternatively, you can try different versions of guava, or start removing methods / classes from guava that don't work.

Or you can wait until a newer version of gwt is released that fixes these issues.

+2


source







All Articles