Friday, May 29, 2020

GWTC 2.9.0 has problems compiling my generics

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
[INFO]    Tracing compile failure path for type ''
[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/'
[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 = -> config.byKey(key).isPresent()).collect(Collectors.toCollection(ArrayList::new));

    // sort by label

This is the method that it is trying to call:
  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
To view this discussion on the web visit

No comments:

Post a Comment