8074972: Unused imports, a missing javadoc and a build warning
Reviewed-by: hannesw, lagergren
--- 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;
--- 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();
}
--- 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;
--- 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();
}
--- 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;
--- 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;
--- 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();
}
--- 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 {
--- 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.
*
--- 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<? extends Tree> asInterface() {
return associatedInterface;
}
--- 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;