Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Guava 10's Predicate and Function interfaces with GWT 2.4.0
    primarykey
    data
    text
    <p>Are <code>Predicate</code>s and <code>Function</code>s supported in GWT 2.4.0 and Guava GWT 10.0.1? Both interfaces are marked as <code>@GwtCompatible</code>.</p> <p>When running the project in debug hosted mode, I receive run-time validation errors at the uses of <code>Predicate</code>:</p> <blockquote> <p>[ERROR] [MyProject] - Line XXY: The import javax.annotation.Nullable cannot be resolved </p> <p>[ERROR] [MyProject] - Line YYY: Nullable cannot be resolved to a type</p> </blockquote> <p>From other StackOverflow posts, I believe these errors should not require including JSR 305 in the path as of Guava version 09 (including JSR 305 in the path didn't fix the problem, anyway).</p> <p>I also appear to receive a couple interface mismatch errors:</p> <blockquote> <p>[ERROR] [MyProject] - Line XXX: The type new Function(){} must implement the inherited abstract method Function.apply(Object)</p> <p>[ERROR] [MyProject] - Line YYY: The method apply(MyType) of type new Function(){} must override or implement a supertype method</p> </blockquote> <p>, and similar errors at uses of <code>Predicate</code>, which I submitted as a bug: <a href="http://code.google.com/p/guava-libraries/issues/detail?id=765" rel="noreferrer">http://code.google.com/p/guava-libraries/issues/detail?id=765</a></p> <p>Any ideas as to what might be wrong with my setup?</p> <p>My <em>Project</em>.gwt.xml file contains the following lines:</p> <pre><code>&lt;inherits name="com.google.common.collect.Collect" /&gt; &lt;inherits name="com.google.common.base.Base" /&gt; </code></pre> <p>My java file includes the following imports:</p> <pre><code>import com.google.common.base.Function; import com.google.common.base.Predicate; </code></pre> <p>I am using Eclipse 3.7.1 and JavaSE-1.6</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload