]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.lz4/src/net/jpountz/xxhash/XXHashFactory.java
Fixed org.simantics.lz4 to use bundle data area when running in OSGi
[simantics/platform.git] / bundles / org.simantics.lz4 / src / net / jpountz / xxhash / XXHashFactory.java
index ab03dff1fcd81eb07b7a52f2ae92a499f600e63a..d9b199bd5fea4327b489ee9c38b2f4147336598e 100644 (file)
@@ -126,8 +126,9 @@ public final class XXHashFactory {
    * using this method.
    */
   public static XXHashFactory fastestInstance() {
-    if (Native.isLoaded()
-        || Native.class.getClassLoader() == ClassLoader.getSystemClassLoader()) {
+    if (!Native.failedToLoad()
+        && (Native.isLoaded()
+            || Native.class.getClassLoader() == ClassLoader.getSystemClassLoader())) {
       try {
         return nativeInstance();
       } catch (Throwable t) {