Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from rmnattas/LUDCL-refresh
Browse files Browse the repository at this point in the history
LUDCL refresh points
  • Loading branch information
pshipton authored Aug 15, 2022
2 parents 3b112d4 + 04e1420 commit ef594cb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/java.base/share/classes/java/io/ObjectInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,18 +597,18 @@ private final Object readObject(Class<?> type, Class<?> caller)

if (((null == curContext) || refreshLudcl) && isClassCachingEnabled) {
oldCachedLudcl = cachedLudcl;
setCached = true;

// If caller is not provided, follow the standard path to get the cachedLudcl.
// Otherwise use the class loader provided by JIT as the cachedLudcl.

if (caller == null) {
cachedLudcl = latestUserDefinedLoader();
refreshLudcl = true;
} else {
cachedLudcl = caller.getClassLoader();
refreshLudcl = false;
}

setCached = true;
refreshLudcl = false;
if (null == startingLudclObject) {
startingLudclObject = this;
}
Expand Down Expand Up @@ -723,9 +723,8 @@ public Object readUnshared() throws IOException, ClassNotFoundException {

if (((null == curContext) || refreshLudcl) && isClassCachingEnabled) {
oldCachedLudcl = cachedLudcl;
cachedLudcl = latestUserDefinedLoader();
setCached = true;
refreshLudcl = false;
refreshLudcl = true;
if (null == startingLudclObject) {
startingLudclObject = this;
}
Expand Down

0 comments on commit ef594cb

Please sign in to comment.