Are Predicate and Function supported in GWT 2.4.0 and Guava GWT 10.0.1? Both interfaces are marked as @GwtCompatible .
When starting a project in debug mode in hosting, I get runtime errors while using Predicate :
[ERROR] [MyProject] - Line XXY: javax.annotation.Nullable import cannot be allowed
[ERROR] [MyProject] - String YYY: Nullable cannot be allowed for type
From other StackOverflow posts, I believe that these errors should not require the inclusion of JSR 305 in the path of version Guava version 09 (including JSR 305 in the path did not fix the problem, anyway).
I also see that you are getting interface mismatch errors:
[ERROR] [MyProject] - Line XXX: type new Function () {} must implement the inherited abstract method Function.apply (Object)
[ERROR] [MyProject] - String YYY: method (MyType) of type new is applied Function () {} must override or implement a supertype Method
and similar errors when using Predicate , which I presented as an error: http://code.google.com/p/guava-libraries/issues/detail?id=765
Any ideas on what might be wrong in my setup?
The file My Project.gwt.xml contains the following lines:
<inherits name="com.google.common.collect.Collect" /> <inherits name="com.google.common.base.Base" />
My java file includes the following imports:
import com.google.common.base.Function; import com.google.common.base.Predicate;
I am using Eclipse 3.7.1 and JavaSE-1.6
Todd schiller
source share