Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.x: javac 9 compatibility fixes #3824

Merged
merged 1 commit into from
Apr 4, 2016
Merged

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Apr 3, 2016

The type inference of javac in JDK 9 has been changed in an incompatible way, marking many generics-related code invalid.

The most common problems:

  • The inference calculates Observable<? extends T> but from its perspective, a call to subscribe() with a Subscriber<T> is ambiguous as it matches subscribe(Observer<? super T>) and subscribe(Subscriber<? super T>). Somehow, the more specific class is not considered as a valid choice. Downcasting to Observable<T> fixes the error.
  • A<?>[] no longer accepts A<Ti> elements, requires the use of raw types to get around

The tests appear to compile fine.

Note that I couldn't find a working IDE for JDK 9 and had to revert to command line trickery:

@echo off

dir /s /B src\main\java\rx\*.java > sources.txt
dir /s /B src\test\java\rx\*.java >> sources.txt

"c:\program files\java\jdk-9\bin\javac.exe" -cp C:/temp/rx/junit.jar;C:/temp/rx/mockito.jar @sources.txt 

del sources.txt

@artem-zinnatullin
Copy link
Contributor

👍

// @akarnokd maybe report "incorrect" behavior of JDK9 compiler to OpenJDK issue tracker?

@akarnokd
Copy link
Member Author

akarnokd commented Apr 3, 2016

There were reports such as this before. Bottom line is that they are fine with their breaking change.

@stevegury
Copy link
Member

👍

@akarnokd akarnokd merged commit 3c86972 into ReactiveX:1.x Apr 4, 2016
@akarnokd akarnokd deleted the JDK9Fixes branch April 4, 2016 18:13
busbey added a commit to busbey/YCSB that referenced this pull request Apr 16, 2016
* in couchbase2 work around ReactiveX/RxJava#3824
* accumulo test hangs, so skip tests
* hbase10 test crashes with unknown class version, so skip tests
* core jar-with-deps fails, so keep them broken out

fixes brianfrankcooper#705
busbey added a commit to busbey/YCSB that referenced this pull request Apr 16, 2016
* in couchbase2 work around ReactiveX/RxJava#3824
* accumulo test hangs, so skip tests
* hbase10 test crashes with unknown class version, so skip tests
* core jar-with-deps fails, so keep them broken out
* add jdk9 to travis

fixes brianfrankcooper#705
busbey added a commit to busbey/YCSB that referenced this pull request Apr 16, 2016
* in couchbase2 work around ReactiveX/RxJava#3824
* accumulo test hangs, so skip tests
* hbase10 test crashes with unknown class version, so skip tests
* core jar-with-deps fails, so keep them broken out
* add jdk9 to travis

fixes brianfrankcooper#704, fixes brianfrankcooper#705
busbey added a commit to busbey/YCSB that referenced this pull request Apr 16, 2016
* in couchbase2 work around ReactiveX/RxJava#3824
* accumulo test hangs, so skip tests
* hbase10 test crashes with unknown class version, so skip tests
* core jar-with-deps fails, so keep them broken out
* add jdk9 to travis

fixes brianfrankcooper#704, fixes brianfrankcooper#705
busbey added a commit to busbey/YCSB that referenced this pull request Apr 17, 2016
* in couchbase2 work around ReactiveX/RxJava#3824
* accumulo test hangs, so skip tests
* hbase10 test crashes with unknown class version, so skip tests
* core jar-with-deps fails, so keep them broken out

fixes brianfrankcooper#704, fixes brianfrankcooper#705
busbey added a commit to busbey/YCSB that referenced this pull request Apr 30, 2016
…xes for jdk9

* in couchbase2 work around ReactiveX/RxJava#3824
* accumulo test hangs, so skip tests
* hbase10 and asynchbase test crashes with unknown class version, so skip tests
* orientdb tests fail, so skip
* core jar-with-deps fails, so keep them broken out

fixes brianfrankcooper#704, fixes brianfrankcooper#705
busbey added a commit to brianfrankcooper/YCSB that referenced this pull request Sep 30, 2016
…xes for jdk9 (#712)

* in couchbase2 work around ReactiveX/RxJava#3824
* accumulo test hangs, so skip tests
* hbase10 and asynchbase test crashes with unknown class version, so skip tests
* orientdb tests fail, so skip
* core jar-with-deps fails, so keep them broken out

fixes #704, fixes #705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants