changeset 57875:9cc77bf8fd8c records-and-sealed

Summary: fix tests by adding sealed, non-sealed, or finaal
author hseigel
date Wed, 02 Oct 2019 15:02:18 +0000
parents 4a89d252a4ef
children fb489259f857 a1911597233f
files test/hotspot/jtreg/runtime/sealedTypes/abstractSealedTest.java test/hotspot/jtreg/runtime/sealedTypes/getPermittedSubtypesTest.java test/hotspot/jtreg/runtime/sealedTypes/overrideSealedTest.java test/hotspot/jtreg/runtime/sealedTypes/sealedTest.java
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/runtime/sealedTypes/abstractSealedTest.java	Tue Oct 01 18:28:27 2019 -0400
+++ b/test/hotspot/jtreg/runtime/sealedTypes/abstractSealedTest.java	Wed Oct 02 15:02:18 2019 +0000
@@ -34,7 +34,7 @@
         abstract void draw();
     }
 
-    class Circle extends abstractShape {
+    sealed class Circle extends abstractShape {
         void draw() {}
     }
 
--- a/test/hotspot/jtreg/runtime/sealedTypes/getPermittedSubtypesTest.java	Tue Oct 01 18:28:27 2019 -0400
+++ b/test/hotspot/jtreg/runtime/sealedTypes/getPermittedSubtypesTest.java	Wed Oct 02 15:02:18 2019 +0000
@@ -36,13 +36,13 @@
 
     sealed class Sealed1 permits Sub1 {}
 
-    class Sub1 extends Sealed1 {}
+    sealed class Sub1 extends Sealed1 {}
 
     sealed interface SealedI1 permits notSealed, Sub1, Extender {}
 
     non-sealed interface Extender extends SealedI1 { }
 
-    class notSealed implements SealedI1 {}
+    non-sealed class notSealed implements SealedI1 {}
 
     sealed class noPermits {}
 
--- a/test/hotspot/jtreg/runtime/sealedTypes/overrideSealedTest.java	Tue Oct 01 18:28:27 2019 -0400
+++ b/test/hotspot/jtreg/runtime/sealedTypes/overrideSealedTest.java	Wed Oct 02 15:02:18 2019 +0000
@@ -34,7 +34,7 @@
         public String draw() { return "rectangle"; }
     }
 
-    class Square extends Rectangle {
+    sealed class Square extends Rectangle {
         public String draw() { return "square"; }
     }
 
@@ -47,7 +47,7 @@
         default String name() { return "shape"; }
     }
 
-    class Circle implements Shape {
+    final class Circle implements Shape {
         public String name() { return "circle"; }
     }
 
--- a/test/hotspot/jtreg/runtime/sealedTypes/sealedTest.java	Tue Oct 01 18:28:27 2019 -0400
+++ b/test/hotspot/jtreg/runtime/sealedTypes/sealedTest.java	Wed Oct 02 15:02:18 2019 +0000
@@ -31,15 +31,15 @@
 
     sealed class Sealed1 permits Sub1 {}
 
-    class Sub1 extends Sealed1 {}
+    non-sealed class Sub1 extends Sealed1 {}
 
     sealed interface SealedI1 permits Sub2 {}
 
-    class Sub2 implements SealedI1 {}
+    sealed class Sub2 implements SealedI1 {}
 
     sealed class Sealed2 {}
 
-    class Sub3 extends Sealed2 {}
+    sealed class Sub3 extends Sealed2 {}
 
     Sub1 sub1 = new Sub1();
     Sub2 sub2 = new Sub2();