Project

General

Profile

Bug #12896

Thread.stop is removed in Java 11 but used in jsengine

Added by François ARMAND almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Architecture - Internal libs
Target version:
Pull Request:
Severity:
User visibility:
Effort required:
Priority:
0

Description

The long deprecated Thread.stop method is finally removed in the Java 11.

We use it in our JS script engine jail to avoid rogue script looping forever.

We need to change that (and if we find a correct solution, use it in all supported version).

Some ideas: https://stackoverflow.com/a/1601307/436331

Concerned code: https://github.com/Normation/rudder/blob/master/rudder-core/src/main/scala/com/normation/rudder/services/policies/JavascriptEngine.scala#L507

#1

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 4.3.3 to 4.3.4
#4

Updated by François ARMAND almost 2 years ago

  • Description updated (diff)
#6

Updated by François ARMAND almost 2 years ago

  • Status changed from New to Rejected

As pointed out by Alan here: http://mail.openjdk.java.net/pipermail/discuss/2018-July/004795.html it's not the method we use that is removed, but a sister one. So I'm closing that ticket, we will deal with the problem when it arise for real.

#7

Updated by François ARMAND almost 2 years ago

For reference, if at one point we need to support a JDK without nashorn, there is that interesting message about graalvm / js and migration from nashorn: http://mail.openjdk.java.net/pipermail/discuss/2018-July/004798.html

Also available in: Atom PDF