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

UnsupportedJavaRuntimeException.javaDeprecationWarning() should fail gracefully #3355

Open
donat opened this issue Nov 3, 2017 · 2 comments
Open

Comments

@donat
Copy link
Member

@donat donat commented Nov 3, 2017

The UnsupportedJavaRuntimeException.javaDeprecationWarning() method calls JavaVersion.current() which throws a runtime exception in previous Gradle versions when executed on Java 9. This is the root cause why the Tooling API lost backward compatibility on that platform (#3317).

Expected Behavior

Instead of throwing an exception, the method should log the parse error when an unknown Java version is found.

Current Behavior

The current state is fine but not future-proof. If a new version scheme is introduced by Java then #3317 will happen again.

@donat donat self-assigned this Nov 3, 2017
@donat

This comment has been minimized.

Copy link
Member Author

@donat donat commented Nov 3, 2017

We can either fix this particular problem or adjust JavaVersion such that it returns an UnknownVersion if the version string parsing fails.

@donat donat added this to the 4.4 RC1 milestone Nov 6, 2017
@oehme oehme assigned blindpirate and unassigned donat Nov 6, 2017
blindpirate added a commit that referenced this issue Nov 7, 2017
…rning()

Fix #3355

Throwing exceptions explicitly would result in some fatal issues in TAPI
(See #3317).
blindpirate added a commit that referenced this issue Nov 8, 2017
…rning()

Fix #3355

Throwing exceptions explicitly would result in some fatal issues in TAPI
(See #3317).
@blindpirate

This comment has been minimized.

Copy link
Member

@blindpirate blindpirate commented Nov 9, 2017

Oops, this is closed automatically by comments in my commits.

@blindpirate blindpirate reopened this Nov 9, 2017
@oehme oehme removed this from the 4.4 RC1 milestone Nov 14, 2017
SergeyZh pushed a commit to JetBrains/android that referenced this issue Jul 8, 2019
Gradle versions less than 4.7 can not be used by the IDE running on Java 9+, see gradle/gradle#8431, gradle/gradle#3355
The change is a workaround to pass "supported Java" check on the Gradle tooling provider side

GitOrigin-RevId: e48e08e777452b31f77c8000be6e6f23b51181cb
SergeyZh pushed a commit to JetBrains/intellij-community that referenced this issue Jul 8, 2019
Gradle versions less than 4.7 can not be used by the IDE running on Java 9+, see gradle/gradle#8431, gradle/gradle#3355
The change is a workaround to pass "supported Java" check on the Gradle tooling provider side

GitOrigin-RevId: e48e08e777452b31f77c8000be6e6f23b51181cb
SergeyZh pushed a commit to JetBrains/android that referenced this issue Jul 10, 2019
… IDEA-209234

Gradle versions less than 4.7 can not be used by the IDE running on Java 9+, see gradle/gradle#8431, gradle/gradle#3355
The change is a workaround to pass "supported Java" check on the Gradle tooling provider side

(cherry picked from commit e48e08e777452b31f77c8000be6e6f23b51181cb)

GitOrigin-RevId: 8ecdb0f0b64bf08ffa1cb7c4632e9694492775f0
SergeyZh pushed a commit to JetBrains/intellij-community that referenced this issue Jul 10, 2019
… IDEA-209234

Gradle versions less than 4.7 can not be used by the IDE running on Java 9+, see gradle/gradle#8431, gradle/gradle#3355
The change is a workaround to pass "supported Java" check on the Gradle tooling provider side

(cherry picked from commit e48e08e777452b31f77c8000be6e6f23b51181cb)

GitOrigin-RevId: 8ecdb0f0b64bf08ffa1cb7c4632e9694492775f0
SergeyZh pushed a commit to JetBrains/intellij-community that referenced this issue Jul 10, 2019
… IDEA-209234

Gradle versions less than 4.7 can not be used by the IDE running on Java 9+, see gradle/gradle#8431, gradle/gradle#3355
The change is a workaround to pass "supported Java" check on the Gradle tooling provider side

(cherry picked from commit e48e08e777452b31f77c8000be6e6f23b51181cb)

(cherry picked from commit 8ecdb0f0b64bf08ffa1cb7c4632e9694492775f0)

GitOrigin-RevId: cd5e2e8d9398cf0b065cd2b1713b19abeee811cf
SergeyZh pushed a commit to JetBrains/android that referenced this issue Jul 10, 2019
… IDEA-209234

Gradle versions less than 4.7 can not be used by the IDE running on Java 9+, see gradle/gradle#8431, gradle/gradle#3355
The change is a workaround to pass "supported Java" check on the Gradle tooling provider side

(cherry picked from commit e48e08e777452b31f77c8000be6e6f23b51181cb)

(cherry picked from commit 8ecdb0f0b64bf08ffa1cb7c4632e9694492775f0)

GitOrigin-RevId: cd5e2e8d9398cf0b065cd2b1713b19abeee811cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.