Closed yilongli closed 9 years ago
At https://github.com/jpountz/lz4-java/blob/aef24cfbbf53d6ade60073b287edc610be743e43/src/java/net/jpountz/lz4/LZ4Factory.java#L149, LZ4Factory.class.getClassLoader() might return null if LZ4Factory is loaded by the bootstrap class loader. It results in a NPE.
LZ4Factory.class.getClassLoader()
LZ4Factory
LZ4Factory is loaded by the bootstrap class loader in my application because I am using lz4 in a Java agent and this Java agent is loaded by the bootstrap class loader.
+1
Closing as I merged https://github.com/jpountz/lz4-java/pull/60
At https://github.com/jpountz/lz4-java/blob/aef24cfbbf53d6ade60073b287edc610be743e43/src/java/net/jpountz/lz4/LZ4Factory.java#L149,
LZ4Factory.class.getClassLoader()
might return null ifLZ4Factory
is loaded by the bootstrap class loader. It results in a NPE.LZ4Factory
is loaded by the bootstrap class loader in my application because I am using lz4 in a Java agent and this Java agent is loaded by the bootstrap class loader.