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

Build project using JDK 11 #1733

Merged
merged 4 commits into from
Feb 14, 2020
Merged

Build project using JDK 11 #1733

merged 4 commits into from
Feb 14, 2020

Conversation

elizarov
Copy link
Contributor

No description provided.

@elizarov
Copy link
Contributor Author

Passes all tests on JDK11 & also tested to pass stress tests. Ready for merge!

elizarov and others added 3 commits February 14, 2020 11:12
* Up the Robolectric version to support JDK11.
  According to robolectric/robolectric#4085, by 4.0.2
it should support JDK11.
  Tests do pass after setting the version to 4.0.2, but they fail for every version released after that up to 4.3.1.
  It is unclear what causes this. I commit this to check how it works on the build agents, as some comments in the issue imply that on MacOS thes version, too, does not work with JDK11.
* Fix fully qualified names in stacktraces in tests:
  - With move to JDK11, the `park` method changed its fully qualified name.
* Add new sanitazing to verification of stacktraces:
  - Now stacktraces have additional substrings, separated by a slash:
    java-base/java.util.lang
  - They are stripped away.
  - Also, the placement of tabs has changed, and so the tabs are also completely removed.
* Refactor `verifyStackTrace`
  - It used to wrap the only loop where something happened in two other loops that did nothing. Now, only the innermost loop is left.
* Use a separate JavaFx dependency.
* Add javafx dependency to the Swing integration
* Improve error handling for JavaFX initialization
  - Now, the JavaFX initialization may fail with an exception in case something went wrong.
  - The driver for this change was that the initialization started hanging in headless environments with transition to JDK 11.
  - Before, the initialization logic had a flaw. If a call to one API
failed, another API would be attempted. However, this approach is
problematic: if the first call failed with an exception for some
reason, it would leave JavaFX in a broken state where a flag would
imply that the system is being initialized. Subsequent calls would
then proceed to wait forever for the initialization to complete.
  - Now, exceptions are checked more carefully, ensuring that we only
fall back to the internal API in case the public one is unavailable
and not failed for some valid reason. This differentiation also
allows to more boldly rethrow exceptions upwards, being more or
less confident that these are relevant to the user.
* Additionally test JavaFX integration with JDK8

Co-authored-by: Dmitry Khalanskiy <dmitry.khalanskiy@jetbrains.com>
Co-authored-by: Roman Elizarov <elizarov@gmail.com>
Copy link
Collaborator

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@elizarov elizarov merged commit 1ac3dc2 into develop Feb 14, 2020
@qwwdfsad qwwdfsad deleted the jdk-11 branch March 16, 2020 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants