Skip to content

Commit

Permalink
Add warning if not dropping from class cache when should
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Jun 22, 2016
1 parent 1cb3e96 commit b03eb43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/javassist/ClassLoaderPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ void writeClassfile(String className, OutputStream out) throws NotFoundException
}

public void dropCache(String name) {
classes.remove(name);
if (classes.remove(name) == null) {
// TODO: Should be behind a system property? Could be very spammy
PatcherLog.warn("Failed to drop " + name + " from cache. Currently cached: " + classes.keySet().toString());
}
}

public static class Handler extends URLStreamHandler {
Expand Down

0 comments on commit b03eb43

Please sign in to comment.