Skip to content

Commit

Permalink
Merge pull request #538 from jglick/convertDeprecatedApprovedClasspat…
Browse files Browse the repository at this point in the history
…hEntriesThread

`convertDeprecatedApprovedClasspathEntriesThread` should be `transient`
  • Loading branch information
jglick authored Nov 27, 2023
2 parents 7ce679c + 85f1153 commit 67ca3d5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ String hashClasspathEntry(URL entry) throws IOException {

static final Hasher DEFAULT_HASHER = Hasher.SHA512;

private Thread convertDeprecatedApprovedClasspathEntriesThread = null;
private transient Thread convertDeprecatedApprovedClasspathEntriesThread = null;

/** All scripts which are already approved, via {@link Hasher#hash(String, String)}. */
private final TreeSet<String> approvedScriptHashes = new TreeSet<>();
Expand Down Expand Up @@ -1073,6 +1073,9 @@ public String getSpinnerIconClassName() {
}
}
LOG.info("Conversion done.");
synchronized (ScriptApproval.this) {
convertDeprecatedApprovedClasspathEntriesThread = null;
}
}, "Approved Classpaths rehasher");
convertDeprecatedApprovedClasspathEntriesThread.setDaemon(true);
convertDeprecatedApprovedClasspathEntriesThread.start();
Expand Down

0 comments on commit 67ca3d5

Please sign in to comment.