Skip to content

Instantly share code, notes, and snippets.

View amitjoy's full-sized avatar
:octocat:
Turning Caffeine ☕️ into Software 👨🏻‍💻

Amit Kumar Mondal amitjoy

:octocat:
Turning Caffeine ☕️ into Software 👨🏻‍💻
View GitHub Profile
@amitjoy
amitjoy / ClassloaderLeakDetector.java
Last active April 17, 2020 12:49
OSGi Classloader Leak Detector
import static java.lang.Long.toHexString;
import static java.util.Comparator.comparingLong;
import static java.util.Objects.hash;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.osgi.framework.Bundle.ACTIVE;
import java.io.PrintWriter;
import java.lang.ref.PhantomReference;
import java.lang.ref.Reference;