title: Incompatible error with gradle on Functions Completable Future
body: <pre><code>public void initateScheduledRequest(long time, Runnable actionRequired) {
      LOGGER.info("Retry Request Initated");
      ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor();
      Executor timeDiff = r -&gt; ses.schedule(() -&gt; executor.execute(r), time, TimeUnit.SECONDS);
      CompletableFuture&lt;Void&gt; future = CompletableFuture.runAsync(actionRequired, executor);
      for (int i = 0; i &lt; 3; i++) {
          future = future
                  .handle((k, v) -&gt; v == null ? CompletableFuture.completedFuture(v)
                          : CompletableFuture.runAsync(actionRequired, timeDiff))
                  .thenCompose(
                           (Function&lt;? super CompletableFuture&lt;? extends Object&gt;, ? extends CompletionStage&lt;Void&gt;&gt;) Function
                                  .identity());
      }
      LOGGER.info("Retry Done");
  }
  </code></pre>
  
  <p>This piece of code is working fine on eclipse but when I am going to build using gradle its giving  error: </p>
  
  <blockquote>
    <p>incompatible types: <code>Function&lt;Object,Object&gt;</code> cannot be converted to
    <code>Function&lt;? super CompletableFuture&lt;? extends Object&gt;,? extends
    CompletionStage&lt;Void&gt;&gt;.identity())</code>;</p>
  </blockquote>
  
  <p>how to rectify this?</p>