test/vm/verifier/VerifyProtectedConstructor.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/test/vm/verifier/VerifyProtectedConstructor.java	Wed Jul 22 11:45:24 2015
--- new/test/vm/verifier/VerifyProtectedConstructor.java	Wed Jul 22 11:45:23 2015

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2007, 2015, 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.
*** 24,34 **** --- 24,34 ---- /** * @test * @bug 6490436 ! * @summary Verify that protected constructor calls are not allowed for classfile version >= 50 (but that they are allowed for lesser versions). ! * @summary Verify that protected constructor calls are not allowed for any classfile versions in either verifier. * @author Keith McGuigan */ public class VerifyProtectedConstructor extends ClassLoader { public static void main(String argv[]) throws Exception {
*** 36,48 **** --- 36,49 ---- t.loadSuperClass(); try { t.checkClassVersion(49); // should not throw VerifyError + throw new Exception("FAIL: should be a VerifyError for CF version 49"); } catch(VerifyError e) { ! throw new Exception("FAIL: should be no VerifyError for CF version 49"); ! System.out.println("PASS for CF version 49"); } try { t.checkClassVersion(50); // should throw VerifyError throw new Exception("FAIL: should be a VerifyError for CF version 50");

test/vm/verifier/VerifyProtectedConstructor.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File