nashorn/test/script/sandbox/javaextend.js
changeset 22669 75563515567f
parent 16522 d643e3ee819c
child 24778 2ff5d7041566
--- 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)