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

Is is impossible to use CoroutinesTimeoutExtension with Java 8 #4278

Closed
osipxd opened this issue Nov 22, 2024 · 0 comments
Closed

Is is impossible to use CoroutinesTimeoutExtension with Java 8 #4278

osipxd opened this issue Nov 22, 2024 · 0 comments
Labels

Comments

@osipxd
Copy link
Member

osipxd commented Nov 22, 2024

Describe the bug

CoroutinesTimeoutExtension uses some "new" APIs:

  • Optional.or { ... } function which was added in Java 9
  • Optional.isEmpty() function which was added in Java 11

So effectively the minimal supported JVM version is 11, which is specified in jdk_toolchain_version, while jvmTarget is set to JvmTarget.JVM_1_8.

Provide a Reproducer

  1. Set the project JVM toolchain to 8
    kotlin {
        jvmToolchain(8)
    }
  2. Add @CoroutinesTimeout to any test
  3. Compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant