Interestingly, I've run into exactly the same issue yesterday, but other way around: my code compiles in GWT 2.9 (and javac and Eclipse), but not in GWT 2.8.2 which refuses to accept parameters for one method with generics-heavy signature.

I've even explored the possibility to force GWT 2.8.2 to use newer ecj, but it's bundled in gwt.dev.jar.

Any help is appreciated.

        -gkresic.


On 29. 05. 2020. 14:07, David Nouls wrote:
I switched from GWT 2.8.2 to GWT 2.9.0 and I get some GWTC compilation errors when compiling with certain generic constructs. It compiles fine with JDK11 and in IntelliJ, but GWTC no longer seems to support this:

[INFO] --- gwt-maven-plugin:1.0.0:compile (default-compile) @ cloud.platform.ui.demo-app ---
[INFO] Compiling module com.swift.cloud.platform.ui.demo.Demo
[INFO]    Tracing compile failure path for type 'com.swift.cloud.platform.ui.webcomponent.widget.query.QueryEditor' [INFO]       [ERROR] Errors in 'jar:file:/home/dnouls/liteevolutiontfr/platform/main/ui/webcomponent/target/cloud.platform.ui.webcomponent-0.0.5-SNAPSHOT.jar!/com/swift/cloud/platform/ui/webcomponent/widget/query/QueryEditor.java' [INFO]          [ERROR] Line 376: The method byKey(IFilterKey<KEY>) in the type QueryConfiguration is not applicable for the arguments (capture#67-of ? extends IFilterKey<?>)
[INFO]    [ERROR] Aborting compile due to errors in some input files


A small piece of the QueryEditor class where this error is reported:

   public void setFilterKeys(Set<? extends IFilterKey<?>> filterKeys) {
    this.allowedFilterKeys = filterKeys.stream().filter(key -> config.byKey(key).isPresent()).collect(Collectors.toCollection(ArrayList::new));

     // sort by label
allowedFilterKeys.sort(Comparator.comparing(config.getLabels()::getKeyLabel));
   }

This is the method that it is trying to call:
   @SuppressWarnings("unchecked")
  public <KEY, VO, CONFIG extends AbstractCriteria<KEY, VO, CONFIG>> Optional<CONFIG> byKey(IFilterKey<KEY> key) {
     return Optional.ofNullable((CONFIG) byKey.get(key));
   }

--
You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/011da579-79ee-4bf2-946f-93e095d0c58d%40googlegroups.com <https://groups.google.com/d/msgid/google-web-toolkit/011da579-79ee-4bf2-946f-93e095d0c58d%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/c4ba1317-bac8-9682-022c-3d3e9e0c26fc%40steatoda.com.

Reply via email to