test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/jdk/test/Main.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/jdk/test/Main.java Wed Apr 18 09:44:57 2018
--- new/test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/jdk/test/Main.java Wed Apr 18 09:44:57 2018
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2015, 2018, 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.
*** 71,85 ****
--- 71,89 ----
// Load the class with the default ClassLoader.
Class<?> clazz = Class.forName(className, true, loader);
// Make sure we got the expected defining ClassLoader
testLoader(clazz, loader);
+
+ String s = null;
+ if (shouldOverride) {
// Create an instance and see what toString() returns
! String s = clazz.newInstance().toString();
+ }
// The overridden version of the class should return "hi". Make sure
// it does only if we are expecting to have loaded the overridden version.
! assertTrue(s.equals("hi") == shouldOverride);
! assertTrue("hi".equals(s) == shouldOverride);
}
/**
* Asserts that given class has the expected defining loader.
*/
test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/src/test/jdk/test/Main.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File