8284336: CDS SignedJar.java test fails due to archived Reference object

Reviewed-by: alanb, ccheung
This commit is contained in:
Ioi Lam 2022-04-08 17:20:10 +00:00
parent 1bd8975caf
commit 662320a0ec
5 changed files with 28 additions and 3 deletions

View file

@ -2716,7 +2716,9 @@ public abstract class ClassLoader {
* Called by the VM, during -Xshare:dump
*/
private void resetArchivedStates() {
parallelLockMap.clear();
if (parallelLockMap != null) {
parallelLockMap.clear();
}
packages.clear();
package2certs.clear();
classes.clear();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2022, 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
@ -1083,5 +1083,6 @@ public class BuiltinClassLoader
// Called from VM only, during -Xshare:dump
private void resetArchivedStates() {
ucp = null;
resourceCache = null;
}
}