question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

compilation error with jdk9

See original GitHub issue

The jdk9 javac contains breaking changes to type inference, even for compilations targeting older language versions: https://bugs.openjdk.java.net/browse/JDK-8075793?focusedCommentId=13865850

Those changes prevent RxJava from building with jdk9.

Repro:

$ java -fullversion
java full version "1.9.0-ea-b80"
$ ./gradlew build
...
./src/main/java/rx/Observable.java:520: error: incompatible types: Observable<CAP#1> cannot be converted to Observable<R>
        return combineLatest(Arrays.asList(o1, o2), Functions.fromFunc(combineFunction));
                            ^
  where R,T1,T2 are type-variables:
    R extends Object declared in method <T1,T2,R>combineLatest(Observable<? extends T1>,Observable<? extends T2>,Func2<? super T1,? super T2,? extends R>)
    T1 extends Object declared in method <T1,T2,R>combineLatest(Observable<? extends T1>,Observable<? extends T2>,Func2<? super T1,? super T2,? extends R>)
    T2 extends Object declared in method <T1,T2,R>combineLatest(Observable<? extends T1>,Observable<? extends T2>,Func2<? super T1,? super T2,? extends R>)
  where CAP#1 is a fresh type-variable:
    CAP#1 extends R from capture of ? extends R
...
38 errors

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
akarnokdcommented, Apr 3, 2016

I’ll look into it.

0reactions
akarnokdcommented, Apr 14, 2016

Should be resolved by now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error (Java SE 9 & JDK 9 ) - Oracle Help Center
An Error is a subclass of Throwable that indicates serious problems that a ... The Java™ Language Specification : 11.2 Compile-Time Checking of...
Read more >
java 9 - Compile errors with JDK 9 - 167 - Stack Overflow
I just downloaded jdk9 build 167 and wanted to continue to check out the new module ... error: file should be on source...
Read more >
Compile Error under JDK9-167 – IDEs Support (IntelliJ Platform)
I got a simple test program. A little Hello World. One Main class in package demo. One module-info.java in the root package. With...
Read more >
Compilation errors not working with JDK 9/10/11 #652 - GitHub
Environment Operating System: macOS High Sierra Version 10.13.6 (17G65) JDK version: 9/10/11 Visual Studio Code version: 1.27.2 x64 Java ...
Read more >
jdk9/jdk9/langtools: log
age author description 2017‑07‑03 mr 8182776: Fix typos in module declarationsjdk‑9+177 2017‑06‑29 lana Added tag jdk‑9+176 for changeset 0d0ac75b0f6c 2017‑06‑22 lana Added tag jdk‑9+175 for changeset...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found