spotify / completable-futures

Utilities for working with futures in Java 8
Apache License 2.0
393 stars 51 forks source link

fix compilation error on javac 11 #83

Closed mattnworb closed 3 years ago

mattnworb commented 3 years ago

The code as-is fails to compile for me with a javac version 11:

$ mvn -V test
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /usr/local/Cellar/maven/3.8.1/libexec
Java version: 11.0.6, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
...
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/mattbrown/code/completable-futures/src/test/java/com/spotify/futures/CompletableFuturesTest.java:[393,13] incompatible types: java.util.List<java.lang.Object> cannot be converted to java.util.List<? extends java.lang.Number>
[INFO] 1 error

but it compiles fine with 8.

This small refactoring seems to appease the type gods (on both versions).