test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/share/StressClassLoadingTest.java
changeset 53744 5b78f051912b
parent 50156 6d6fe9416864
child 55130 e6e4de80e058
--- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/share/StressClassLoadingTest.java	Wed Feb 13 11:08:51 2019 -0800
+++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/share/StressClassLoadingTest.java	Wed Feb 13 11:18:14 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2019, 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
@@ -169,7 +169,7 @@
                             c = CustomClassLoaders.makeClassBytesLoader(classBytes, className)
                                     .loadClass(className);
                         }
-                        c.newInstance();
+                        UnsafeAccess.unsafe.ensureClassInitialized(c);
                     } catch (Throwable e) {
                         Env.traceVerbose(e, "parser caught exception");
                     }