aboutsummaryrefslogtreecommitdiff
path: root/test/vm
diff options
context:
space:
mode:
authorbharadwaj <none@none>2013-02-14 11:09:07 -0800
committerbharadwaj <none@none>2013-02-14 11:09:07 -0800
commit5cc0ffeffba81672c3cf8fd549c8e137e9a95fa3 (patch)
tree0121ecf8e8fbcd5dbf5caa8245f1cf76240179da /test/vm
parent21bb2c9bfdb909780726ac9e6ef1d15b6e658ca9 (diff)
downloadjdk8u_jdk-5cc0ffeffba81672c3cf8fd549c8e137e9a95fa3.tar.gz
8007736: VerifyError for use of static method in interface
Reviewed-by: mchung
Diffstat (limited to 'test/vm')
-rw-r--r--test/vm/verifier/TestStaticIF.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/vm/verifier/TestStaticIF.java b/test/vm/verifier/TestStaticIF.java
new file mode 100644
index 0000000000..5a6776f3fc
--- /dev/null
+++ b/test/vm/verifier/TestStaticIF.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test
+ * @bug 8007736
+ * @summary Test static interface method.
+ * @run main/othervm -Xverify:all -XX:-UseSplitVerifier TestStaticIF
+ */
+
+public class TestStaticIF implements StaticMethodInInterface {
+
+ public static void main(String[] args) {
+ System.out.printf("main: %s%n", StaticMethodInInterface.get());
+ }
+}
+
+interface StaticMethodInInterface {
+
+ public static String get() {
+ return "Hello from StaticMethodInInterface.get()";
+ }
+}