--- a/nashorn/test/script/sandbox/javaextend.js Thu Jan 30 19:28:40 2014 +0530
+++ b/nashorn/test/script/sandbox/javaextend.js Thu Jan 30 20:13:27 2014 +0100
@@ -51,6 +51,21 @@
print(e)
}
+// Can't extend a class with explicit non-overridable finalizer
+try {
+ Java.extend(model("ClassWithFinalFinalizer"))
+} catch(e) {
+ print(e)
+}
+
+// Can't extend a class with inherited non-overridable finalizer
+try {
+ Java.extend(model("ClassWithInheritedFinalFinalizer"))
+} catch(e) {
+ print(e)
+}
+
+
// Can't extend two classes
try {
Java.extend(java.lang.Thread,java.lang.Number)