# HG changeset patch # User sundar # Date 1426073284 -19800 # Node ID 6dfd487fbad417ce202e14d5f27b109e560af257 # Parent 79e9da5fffbc488018e916927cef68604fe8ceb3 8074972: Unused imports, a missing javadoc and a build warning Reviewed-by: hannesw, lagergren diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java Wed Mar 11 16:58:04 2015 +0530 @@ -250,6 +250,7 @@ * * @return this object's numeric value. */ + @SuppressWarnings("deprecation") @Override public double toNumber() { return Double.NaN; diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTree.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTree.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTree.java Wed Mar 11 16:58:04 2015 +0530 @@ -45,5 +45,6 @@ * * @return label associated with this break statement. */ + @Override String getLabel(); } diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTreeImpl.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTreeImpl.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTreeImpl.java Wed Mar 11 16:58:04 2015 +0530 @@ -26,7 +26,6 @@ package jdk.nashorn.api.tree; import jdk.nashorn.internal.ir.BreakNode; -import jdk.nashorn.internal.ir.IdentNode; final class BreakTreeImpl extends StatementTreeImpl implements BreakTree { private final String label; diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTree.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTree.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTree.java Wed Mar 11 16:58:04 2015 +0530 @@ -44,5 +44,6 @@ * * @return label associated with this continue statement. */ + @Override String getLabel(); } diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTreeImpl.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTreeImpl.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTreeImpl.java Wed Mar 11 16:58:04 2015 +0530 @@ -26,7 +26,6 @@ package jdk.nashorn.api.tree; import jdk.nashorn.internal.ir.ContinueNode; -import jdk.nashorn.internal.ir.IdentNode; final class ContinueTreeImpl extends StatementTreeImpl implements ContinueTree { private final String label; diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DiagnosticImpl.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DiagnosticImpl.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DiagnosticImpl.java Wed Mar 11 16:58:04 2015 +0530 @@ -27,7 +27,6 @@ import jdk.nashorn.internal.parser.Token; import jdk.nashorn.internal.runtime.ParserException; -import jdk.nashorn.internal.runtime.Source; final class DiagnosticImpl implements Diagnostic { private final ParserException exp; diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTree.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTree.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTree.java Wed Mar 11 16:58:04 2015 +0530 @@ -50,6 +50,7 @@ * * @return the condition expression */ + @Override ExpressionTree getCondition(); /** @@ -64,5 +65,6 @@ * * @return the statement */ + @Override StatementTree getStatement(); } diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTreeImpl.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTreeImpl.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTreeImpl.java Wed Mar 11 16:58:04 2015 +0530 @@ -25,7 +25,6 @@ package jdk.nashorn.api.tree; -import java.util.List; import jdk.nashorn.internal.ir.ForNode; final class ForLoopTreeImpl extends StatementTreeImpl implements ForLoopTree { diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/NewTree.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/NewTree.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/NewTree.java Wed Mar 11 16:58:04 2015 +0530 @@ -25,8 +25,6 @@ package jdk.nashorn.api.tree; -import java.util.List; - /** * A tree node to declare a new instance of a class. * diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Tree.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Tree.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/Tree.java Wed Mar 11 16:58:04 2015 +0530 @@ -530,6 +530,10 @@ associatedInterface = intf; } + /** + * Returns the associated interface type that uses this kind. + * @return the associated interface + */ public Class asInterface() { return associatedInterface; } diff -r 79e9da5fffbc -r 6dfd487fbad4 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/ErrorNode.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/ErrorNode.java Wed Mar 11 11:08:22 2015 +0100 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/ErrorNode.java Wed Mar 11 16:58:04 2015 +0530 @@ -25,7 +25,6 @@ package jdk.nashorn.internal.ir; -import java.util.function.Function; import jdk.nashorn.internal.codegen.types.Type; import jdk.nashorn.internal.ir.annotations.Immutable; import jdk.nashorn.internal.ir.visitor.NodeVisitor;