lucko / helper

A collection of utilities and extended APIs to support the rapid and easy development of Bukkit plugins.
MIT License
456 stars 87 forks source link

HelperPromise Java 17 #128

Open StealWonders opened 2 years ago

StealWonders commented 2 years ago
src\main\java\me\lucko\helper\promise\HelperPromise.java:92: error: method addCallback in class Futures cannot be applied to given types;
            Futures.addCallback(fut, new FutureCallback<U>() {
                   ^
  required: ListenableFuture<V>,FutureCallback<? super V>,Executor
  found:    ListenableFuture<U>,<anonymous FutureCallback<U>>
  reason: cannot infer type-variable(s) V
    (actual and formal argument lists differ in length)
  where V,U are type-variables:
    V extends Object declared in method <V>addCallback(ListenableFuture<V>,FutureCallback<? super V>,Executor)
    U extends Object declared in method <U>wrapFuture(Future<U>)