8204492: Add deprecation annotation to Nashorn APIs and warning to nashorn, jjs
Reviewed-by: jlaskey, hannesw
--- a/make/CompileJavaModules.gmk Thu Jun 28 13:58:30 2018 +0200
+++ b/make/CompileJavaModules.gmk Thu Jun 28 18:04:19 2018 +0530
@@ -345,10 +345,12 @@
################################################################################
+jdk.scripting.nashorn_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
jdk.scripting.nashorn_COPY := .properties .js
################################################################################
+jdk.scripting.nashorn.shell_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
jdk.scripting.nashorn.shell_COPY += .js .properties
################################################################################
--- a/make/nashorn/project.properties Thu Jun 28 13:58:30 2018 +0200
+++ b/make/nashorn/project.properties Thu Jun 28 18:04:19 2018 +0530
@@ -371,6 +371,7 @@
-Duser.language=${run.test.user.language} \
-Duser.country=${run.test.user.country} \
-Dnashorn.typeInfo.cacheDir=${build.dir}${file.separator}test${file.separator}type_info_cache \
+ -Dnashorn.args.prepend=--no-deprecation-warning \
${jfr.args} \
-XX:+HeapDumpOnOutOfMemoryError
--- a/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java Thu Jun 28 18:04:19 2018 +0530
@@ -60,6 +60,7 @@
/**
* Interactive command line Shell for Nashorn.
*/
+@Deprecated(since="11", forRemoval=true)
public final class Main extends Shell {
private Main() {}
--- a/src/jdk.scripting.nashorn.shell/share/classes/module-info.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn.shell/share/classes/module-info.java Thu Jun 28 18:04:19 2018 +0530
@@ -37,6 +37,7 @@
* @moduleGraph
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
module jdk.scripting.nashorn.shell {
requires static java.compiler;
requires jdk.internal.le;
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/linker/NashornLinkerExporter.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/linker/NashornLinkerExporter.java Thu Jun 28 18:04:19 2018 +0530
@@ -42,6 +42,7 @@
* can use the linkers exported by this provider to support tight integration
* of Nashorn objects.
*/
+@Deprecated(since="11", forRemoval=true)
public final class NashornLinkerExporter extends GuardingDynamicLinkerExporter {
/**
* The default constructor.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java Thu Jun 28 18:04:19 2018 +0530
@@ -38,8 +38,12 @@
* operations like obj[i], obj.foo, obj.func(), delete obj.foo will be delegated
* to appropriate method call of this class.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public abstract class AbstractJSObject implements JSObject {
/**
* The default constructor.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ClassFilter.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ClassFilter.java Thu Jun 28 18:04:19 2018 +0530
@@ -29,8 +29,12 @@
* jsr-223 program embedding nashorn script can set ClassFilter instance
* to be used when an engine instance is created.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public interface ClassFilter {
/**
* Should the Java class of the specified name be exposed to scripts?
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/JSObject.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/JSObject.java Thu Jun 28 18:04:19 2018 +0530
@@ -35,8 +35,12 @@
* operations like obj[i], obj.foo, obj.func(), delete obj.foo will be delegated
* to appropriate method call of this interface.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public interface JSObject {
/**
* Call this object as a JavaScript function. This is equivalent to
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornException.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornException.java Thu Jun 28 18:04:19 2018 +0530
@@ -42,8 +42,12 @@
* interface. In these cases, user code will get an instance of this or
* implementation defined subclass.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
@SuppressWarnings("serial")
public abstract class NashornException extends RuntimeException {
private static final long serialVersionUID = 1L;
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java Thu Jun 28 18:04:19 2018 +0530
@@ -67,8 +67,12 @@
* {@link Invocable} interfaces, allowing for efficient precompilation and repeated execution of scripts.
* @see NashornScriptEngineFactory
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public final class NashornScriptEngine extends AbstractScriptEngine implements Compilable, Invocable {
/**
* Key used to associate Nashorn global object mirror with arbitrary Bindings instance.
@@ -135,6 +139,10 @@
}
}, CREATE_CONTEXT_ACC_CTXT);
+ if (!nashornContext.getEnv()._no_deprecation_warning) {
+ System.err.println("Warning: Nashorn engine is planned to be removed from a future JDK release");
+ }
+
// cache this option that is used often
this._global_per_engine = nashornContext.getEnv()._global_per_engine;
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngineFactory.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngineFactory.java Thu Jun 28 18:04:19 2018 +0530
@@ -46,8 +46,12 @@
* Programs executing in engines created using {@link #getScriptEngine(String[])} will have the passed arguments
* accessible as a global variable named {@code "arguments"}.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public final class NashornScriptEngineFactory implements ScriptEngineFactory {
@Override
public String getEngineName() {
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ScriptObjectMirror.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ScriptObjectMirror.java Thu Jun 28 18:04:19 2018 +0530
@@ -58,8 +58,12 @@
/**
* Mirror object that wraps a given Nashorn Script object.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public final class ScriptObjectMirror extends AbstractJSObject implements Bindings {
private static AccessControlContext getContextAccCtxt() {
final Permissions perms = new Permissions();
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ScriptUtils.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ScriptUtils.java Thu Jun 28 18:04:19 2018 +0530
@@ -37,8 +37,12 @@
/**
* Utilities that are to be called from script code.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public final class ScriptUtils {
private ScriptUtils() {}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/URLReader.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/URLReader.java Thu Jun 28 18:04:19 2018 +0530
@@ -37,8 +37,12 @@
* A Reader that reads from a URL. Used to make sure that the reader
* reads content from given URL and can be trusted to do so.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 1.8u40
*/
+@Deprecated(since="11", forRemoval=true)
public final class URLReader extends Reader {
// underlying URL
private final URL url;
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayAccessTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayAccessTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>expression</em> [ <em>index</em> ]
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ArrayAccessTree extends ExpressionTree {
/**
* Returns the array that is accessed.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayLiteralTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayLiteralTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -30,8 +30,12 @@
/**
* Represents ECMAScript array literal expression.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ArrayLiteralTree extends ExpressionTree {
/**
* Returns the list of Array element expressions.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/AssignmentTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/AssignmentTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>variable</em> = <em>expression</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface AssignmentTree extends ExpressionTree {
/**
* Returns the left hand side (LHS) of this assignment.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BinaryTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BinaryTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>leftOperand</em> <em>operator</em> <em>rightOperand</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface BinaryTree extends ExpressionTree {
/**
* Returns left hand side (LHS) of this binary expression.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BlockTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BlockTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -37,8 +37,12 @@
* { <em>statements</em> }
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface BlockTree extends StatementTree {
/**
* Returns the list of statements in this block.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -35,8 +35,12 @@
* break <em>label</em> ;
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface BreakTree extends GotoTree {
/**
* Label associated with this break statement. This is null
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CaseTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CaseTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -39,8 +39,12 @@
* <em>statements</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface CaseTree extends Tree {
/**
* Case expression of this 'case' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CatchTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CatchTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>block</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface CatchTree extends Tree {
/**
* Returns the catch parameter identifier or parameter binding pattern of the exception caught.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ClassDeclarationTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ClassDeclarationTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -29,8 +29,12 @@
/**
* A tree node that represents a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions">class declaration</a>.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ClassDeclarationTree extends StatementTree {
/**
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ClassExpressionTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ClassExpressionTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -30,8 +30,12 @@
/**
* A tree node that represents a <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions">class expression</a>.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ClassExpressionTree extends ExpressionTree {
/**
* Class identifier. Optional.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompilationUnitTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompilationUnitTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -31,8 +31,12 @@
* Represents the abstract syntax tree for compilation units (source
* files)
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface CompilationUnitTree extends Tree {
/**
* Return the list of source elements in this compilation unit.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompoundAssignmentTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompoundAssignmentTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>variable</em> <em>operator</em> <em>expression</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface CompoundAssignmentTree extends ExpressionTree {
/**
* Returns the left hand side (LHS) of this assignment.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ConditionalExpressionTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ConditionalExpressionTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>condition</em> ? <em>trueExpression</em> : <em>falseExpression</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ConditionalExpressionTree extends ExpressionTree {
/**
* Returns the condition expression of this ternary expression.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ConditionalLoopTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ConditionalLoopTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,8 +28,12 @@
/**
* A mixin for conditional "loop" statements.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ConditionalLoopTree extends LoopTree {
/**
* Returns the condition expression of this 'loop' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* continue <em>label</em> ;
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ContinueTree extends GotoTree {
/**
* Label associated with this continue statement. This is null
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DebuggerTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DebuggerTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,7 +33,11 @@
* <em>debugger;</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface DebuggerTree extends StatementTree {
}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Diagnostic.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Diagnostic.java Thu Jun 28 18:04:19 2018 +0530
@@ -40,8 +40,12 @@
* <p>Line terminator is as defined in ECMAScript specification which is one
* of { \u000A, \u000B, \u2028, \u2029 }.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface Diagnostic {
/**
@@ -55,7 +59,11 @@
* should imply any inherent semantic meaning to the message
* of the diagnostic: for example, a tool might provide an
* option to report all warnings as errors.
+ *
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
*/
+ @Deprecated(since="11", forRemoval=true)
enum Kind {
/**
* Problem which prevents the tool's normal completion.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DiagnosticListener.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DiagnosticListener.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,8 +28,12 @@
/**
* Interface for receiving diagnostics from Nashorn parser.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
@FunctionalInterface
public interface DiagnosticListener {
/**
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DoWhileLoopTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DoWhileLoopTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -35,8 +35,12 @@
* while ( <em>expression</em> );
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface DoWhileLoopTree extends ConditionalLoopTree {
/**
* Returns the condition expression of this do-while statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/EmptyStatementTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/EmptyStatementTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,6 +33,10 @@
* ;
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface EmptyStatementTree extends StatementTree {}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ErroneousTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ErroneousTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,7 +28,11 @@
/**
* A tree node to stand in for a malformed expression.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ErroneousTree extends ExpressionTree {
}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExportEntryTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExportEntryTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,7 +28,11 @@
/**
* A Tree node for export entry in <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-modules">Module information</a>.
+ *
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
*/
+@Deprecated(since="11", forRemoval=true)
public interface ExportEntryTree extends Tree {
/**
* Returns the entry's export name.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExpressionStatementTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExpressionStatementTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>expression</em> ;
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ExpressionStatementTree extends StatementTree {
/**
* Returns the expression of this expression statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExpressionTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExpressionTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -29,6 +29,10 @@
* A tree node used as the base class for the different types of
* expressions.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ExpressionTree extends Tree {}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForInLoopTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForInLoopTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>statement</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ForInLoopTree extends LoopTree {
/**
* The for..in left hand side expression.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>statement</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ForLoopTree extends ConditionalLoopTree {
/**
* Returns the initializer expression of this 'for' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForOfLoopTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForOfLoopTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>statement</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ForOfLoopTree extends LoopTree {
/**
* The for..of left hand side expression.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionCallTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionCallTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -37,8 +37,12 @@
* this . <em>identifier</em> ( <em>arguments</em> )
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface FunctionCallTree extends ExpressionTree {
/**
* Returns the function being called.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionDeclarationTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionDeclarationTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -43,8 +43,12 @@
* <em>body</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface FunctionDeclarationTree extends StatementTree {
/**
* Returns the name of the function being declared.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionExpressionTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionExpressionTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -41,8 +41,12 @@
* <em>var</em> func = <em>(x) => x+1</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface FunctionExpressionTree extends ExpressionTree {
/**
* Returns the name of the function being declared.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/GotoTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/GotoTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -31,8 +31,12 @@
* type serves as a super interface for {@link BreakTree} and
* {@link ContinueTree}.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface GotoTree extends StatementTree {
/**
* Label associated with this goto statement. This is null
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IdentifierTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IdentifierTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>name</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface IdentifierTree extends ExpressionTree {
/**
* Returns the name of this identifier.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IfTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IfTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -39,8 +39,12 @@
* <em>elseStatement</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface IfTree extends StatementTree {
/**
* Returns the condition expression of this 'if' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ImportEntryTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ImportEntryTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,7 +28,11 @@
/**
* A Tree node for import entry of <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-modules">Module information</a>.
+ *
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
*/
+@Deprecated(since="11", forRemoval=true)
public interface ImportEntryTree extends Tree {
/**
* Returns the entry's module request.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/InstanceOfTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/InstanceOfTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>expression</em> instanceof <em>type</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface InstanceOfTree extends ExpressionTree {
/**
* Returns the expression whose type is being checked.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LabeledStatementTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LabeledStatementTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>label</em> : <em>statement</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface LabeledStatementTree extends StatementTree {
/**
* Returns the label associated with this statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LineMap.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LineMap.java Thu Jun 28 18:04:19 2018 +0530
@@ -29,8 +29,12 @@
* Provides methods to convert between character positions and line numbers
* for a compilation unit.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface LineMap {
/**
* Find the line containing a position; a line termination
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LiteralTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LiteralTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>value</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface LiteralTree extends ExpressionTree {
/**
* Returns the value of this literal.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LoopTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LoopTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,8 +28,12 @@
/**
* A mixin for "loop" statements.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface LoopTree extends StatementTree {
/**
* Returns the statement contained in this 'loop' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/MemberSelectTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/MemberSelectTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* <em>expression</em> . <em>identifier</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface MemberSelectTree extends ExpressionTree {
/**
* The object expression whose member is being selected.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ModuleTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ModuleTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,7 +28,11 @@
/**
* A Tree node for <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-modules">Module information</a>.
+ *
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
*/
+@Deprecated(since="11", forRemoval=true)
public interface ModuleTree extends Tree {
/**
* Returns the list of import entries.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/NewTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/NewTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -35,8 +35,12 @@
* new <em>identifier</em> ( <em>arguments</em> )
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface NewTree extends ExpressionTree {
/**
* Returns the constructor expression of this 'new' expression.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ObjectLiteralTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ObjectLiteralTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -30,8 +30,12 @@
/**
* Represents ECMAScript object literal expression.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ObjectLiteralTree extends ExpressionTree {
/**
* Returns the list of properties of this object literal.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ParenthesizedTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ParenthesizedTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* ( <em>expression</em> )
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ParenthesizedTree extends ExpressionTree {
/**
* Returns the expression within the parenthesis.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Parser.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Parser.java Thu Jun 28 18:04:19 2018 +0530
@@ -36,8 +36,12 @@
/**
* Represents nashorn ECMAScript parser instance.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface Parser {
/**
* Parses the source file and returns compilation unit tree
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/PropertyTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/PropertyTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,8 +28,12 @@
/**
* To represent property setting in an object literal tree.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface PropertyTree extends Tree {
/**
* Returns the name of this property.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/RegExpLiteralTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/RegExpLiteralTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -28,8 +28,12 @@
/**
* Represents regular expression literal in the source code.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface RegExpLiteralTree extends ExpressionTree {
/**
* Regular expression pattern to match.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ReturnTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ReturnTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* return <em>expression</em>;
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ReturnTree extends StatementTree {
/**
* Returns the expression being returned. This is null if no value
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SimpleTreeVisitorES5_1.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SimpleTreeVisitorES5_1.java Thu Jun 28 18:04:19 2018 +0530
@@ -40,12 +40,16 @@
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*/
+@Deprecated(since="11", forRemoval=true)
public class SimpleTreeVisitorES5_1<R, P> implements TreeVisitor<R, P> {
@Override
public R visitAssignment(final AssignmentTree node, final P r) {
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SimpleTreeVisitorES6.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SimpleTreeVisitorES6.java Thu Jun 28 18:04:19 2018 +0530
@@ -42,12 +42,16 @@
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*/
+@Deprecated(since="11", forRemoval=true)
public class SimpleTreeVisitorES6<R, P> extends SimpleTreeVisitorES5_1<R, P> {
@Override
public R visitCompilationUnit(final CompilationUnitTree node, final P r) {
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SpreadTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SpreadTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -27,7 +27,11 @@
/**
* A tree node for spread operator in array elements, function call arguments.
+ *
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
*/
+@Deprecated(since="11", forRemoval=true)
public interface SpreadTree extends ExpressionTree {
/**
* Returns the expression that is being spread.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/StatementTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/StatementTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -29,7 +29,11 @@
* A tree node used as the base class for the different kinds of
* statements.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface StatementTree extends Tree {
}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SwitchTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SwitchTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -37,8 +37,12 @@
* }
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface SwitchTree extends StatementTree {
/**
* Returns the expression on which this statement switches.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TemplateLiteralTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TemplateLiteralTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -35,9 +35,13 @@
* `This is a String with ${computed} values in it`
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*
*/
+@Deprecated(since="11", forRemoval=true)
public interface TemplateLiteralTree extends ExpressionTree {
/**
* Returns the list of expressions in this template string
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ThrowTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ThrowTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* throw <em>expression</em>;
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface ThrowTree extends StatementTree {
/**
* Returns the expression being thrown.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Tree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Tree.java Thu Jun 28 18:04:19 2018 +0530
@@ -31,13 +31,21 @@
* <p><b>WARNING:</b> This interface and its sub-interfaces are
* subject to change as the ECMAScript programming language evolves.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface Tree {
/**
* Enumerates all kinds of trees.
+ *
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
*/
+ @Deprecated(since="11", forRemoval=true)
public enum Kind {
/**
* Used for instances of {@link ArrayAccessTree}.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeVisitor.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeVisitor.java Thu Jun 28 18:04:19 2018 +0530
@@ -45,6 +45,9 @@
default method bodies will be introduced which will call visitUnknown
method as a fallback.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
@@ -53,6 +56,7 @@
*
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface TreeVisitor<R,P> {
/**
* Visit assignment tree.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TryTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TryTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -39,8 +39,12 @@
* <em>finallyBlock</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface TryTree extends StatementTree {
/**
* Returns the 'try' block of this 'try' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/UnaryTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/UnaryTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -36,8 +36,12 @@
* <em>expression</em> <em>operator</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface UnaryTree extends ExpressionTree {
/**
* Returns the expression operated by the unary operator.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/UnknownTreeException.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/UnknownTreeException.java Thu Jun 28 18:04:19 2018 +0530
@@ -33,8 +33,12 @@
* {@linkplain TreeVisitor tree visitor} to indicate that the
* visitor was created for a prior version of the language.
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public class UnknownTreeException extends RuntimeException {
private static final long serialVersionUID = 1L;
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/VariableTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/VariableTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>var</em> <em>binding_pattern</em> [ <em>initializer</em> ];
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface VariableTree extends StatementTree {
/**
* Returns the binding of this declaration. This is an {@link IdentifierTree}
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WhileLoopTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WhileLoopTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>statement</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface WhileLoopTree extends ConditionalLoopTree {
/**
* The condition expression of this 'while' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WithTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WithTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -34,8 +34,12 @@
* <em>statement</em>
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface WithTree extends StatementTree {
/**
* The scope object expression for this 'with' statement.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/YieldTree.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/YieldTree.java Thu Jun 28 18:04:19 2018 +0530
@@ -37,8 +37,12 @@
* }
* </pre>
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
public interface YieldTree extends ExpressionTree {
/**
* Returns the expression that is yielded.
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptEnvironment.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptEnvironment.java Thu Jun 28 18:04:19 2018 +0530
@@ -108,6 +108,8 @@
/** Enable experimental ECMAScript 6 features. */
public final boolean _es6;
+ /** do not show deprecation warning for nashorn engine and jjs usage. */
+ public final boolean _no_deprecation_warning;
/** Number of times a dynamic call site has to be relinked before it is
* considered unstable (and thus should be linked as if it were megamorphic).
@@ -306,6 +308,7 @@
_strict = options.getBoolean("strict");
_version = options.getBoolean("version");
_verify_code = options.getBoolean("verify.code");
+ _no_deprecation_warning = options.getBoolean("no.deprecation.warning");
final int configuredUrt = options.getInteger("unstable.relink.threshold");
// The default for this property is -1, so we can easily detect when
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties Thu Jun 28 18:04:19 2018 +0530
@@ -223,6 +223,14 @@
type=Log \
}
+nashorn.option.no.deprecation.warning = { \
+ name="--no-deprecation-warning", \
+ type=Boolean, \
+ default=false, \
+ desc="Do not show nashorn deprecation warning." \
+}
+
+
nashorn.option.lazy.compilation = { \
name="--lazy-compilation", \
is_undocumented=true, \
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/tools/Shell.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/tools/Shell.java Thu Jun 28 18:04:19 2018 +0530
@@ -170,6 +170,9 @@
final Global global = context.createGlobal();
final ScriptEnvironment env = context.getEnv();
+ if (!env._no_deprecation_warning) {
+ System.err.println("Warning: The jjs tool is planned to be removed from a future JDK release");
+ }
final List<String> files = env.getFiles();
if (files.isEmpty()) {
return readEvalPrint(context, global);
--- a/src/jdk.scripting.nashorn/share/classes/module-info.java Thu Jun 28 13:58:30 2018 +0200
+++ b/src/jdk.scripting.nashorn/share/classes/module-info.java Thu Jun 28 18:04:19 2018 +0530
@@ -135,10 +135,14 @@
* non-standard built-in objects:
* {@code JSAdapter}, {@code JavaImporter}, {@code Packages}
*
+ * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
+ * are deprecated with the intent to remove them in a future release.
+ *
* @provides javax.script.ScriptEngineFactory
* @moduleGraph
* @since 9
*/
+@Deprecated(since="11", forRemoval=true)
module jdk.scripting.nashorn {
requires java.logging;
requires jdk.dynalink;
--- a/test/jdk/sun/tools/jrunscript/jrunscript-eTest.sh Thu Jun 28 13:58:30 2018 +0200
+++ b/test/jdk/sun/tools/jrunscript/jrunscript-eTest.sh Thu Jun 28 18:04:19 2018 +0530
@@ -42,7 +42,7 @@
# -e option with JavaScript explicitly choosen as language
rm -f jrunscript-eTest.out 2>/dev/null
-${JRUNSCRIPT} -J-Djava.awt.headless=true -l nashorn -e "println('hello')" > jrunscript-eTest.out 2>&1
+${JRUNSCRIPT} -J-Dnashorn.args.prepend=--no-deprecation-warning -J-Djava.awt.headless=true -l nashorn -e "println('hello')" > jrunscript-eTest.out 2>&1
$golden_diff jrunscript-eTest.out ${TESTSRC}/dash-e.out
if [ $? != 0 ]
--- a/test/jdk/sun/tools/jrunscript/jrunscript-fTest.sh Thu Jun 28 13:58:30 2018 +0200
+++ b/test/jdk/sun/tools/jrunscript/jrunscript-fTest.sh Thu Jun 28 18:04:19 2018 +0530
@@ -43,7 +43,7 @@
# with -l option
rm -f jrunscript-fTest.out 2>/dev/null
-${JRUNSCRIPT} -J-Djava.awt.headless=true -l nashorn -f ${TESTSRC}/hello.js > jrunscript-fTest.out 2>&1
+${JRUNSCRIPT} -J-Dnashorn.args.prepend=--no-deprecation-warning -J-Djava.awt.headless=true -l nashorn -f ${TESTSRC}/hello.js > jrunscript-fTest.out 2>&1
$golden_diff jrunscript-fTest.out ${TESTSRC}/dash-f.out
if [ $? != 0 ]
--- a/test/jdk/sun/tools/jrunscript/jrunscriptTest.sh Thu Jun 28 13:58:30 2018 +0200
+++ b/test/jdk/sun/tools/jrunscript/jrunscriptTest.sh Thu Jun 28 18:04:19 2018 +0530
@@ -40,7 +40,7 @@
fi
rm -f jrunscriptTest.out 2>/dev/null
-${JRUNSCRIPT} -J-Djava.awt.headless=true -l nashorn > jrunscriptTest.out 2>&1 <<EOF
+${JRUNSCRIPT} -J-Dnashorn.args.prepend=--no-deprecation-warning -J-Djava.awt.headless=true -l nashorn > jrunscriptTest.out 2>&1 <<EOF
v = 2 + 5;
v *= 5; v.doubleValue();
v = v + " is the value";
--- a/test/jdk/tools/jjs/jjs-fileTest.sh Thu Jun 28 13:58:30 2018 +0200
+++ b/test/jdk/tools/jjs/jjs-fileTest.sh Thu Jun 28 18:04:19 2018 +0530
@@ -35,7 +35,7 @@
setup
rm -f jjs-fileTest.out 2>/dev/null
-${JJS} -J-Djava.security.manager ${TESTSRC}/file.js > jjs-fileTest.out 2>&1
+${JJS} --no-deprecation-warning -J-Djava.security.manager ${TESTSRC}/file.js > jjs-fileTest.out 2>&1
$golden_diff jjs-fileTest.out ${TESTSRC}/file.out
if [ $? != 0 ]
--- a/test/nashorn/script/nosecurity/JDK-8193137.js Thu Jun 28 13:58:30 2018 +0200
+++ b/test/nashorn/script/nosecurity/JDK-8193137.js Thu Jun 28 18:04:19 2018 +0530
@@ -54,6 +54,6 @@
emptyFile.createNewFile();
emptyFile.deleteOnExit();
-$EXEC(jjsCmd + " empty.js");
+$EXEC(jjsCmd + " --no-deprecation-warning empty.js");
if($ERR != "")
fail("jjs fails with empty script file");