< prev index next >

test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/share/StressClassLoadingTest.java

Print this page
rev 53736 : 8195060: vm/mlvm/anonloader/stress/byteMutation intermittently times out
Reviewed-by: duke

@@ -1,7 +1,7 @@
 /*
- * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -167,11 +167,11 @@
                             c = UnsafeAccess.unsafe.defineAnonymousClass(hostClass, classBytes, null);
                         } else {
                             c = CustomClassLoaders.makeClassBytesLoader(classBytes, className)
                                     .loadClass(className);
                         }
-                        c.newInstance();
+                        UnsafeAccess.unsafe.ensureClassInitialized(c);
                     } catch (Throwable e) {
                         Env.traceVerbose(e, "parser caught exception");
                     }
                 }
             };
< prev index next >