From 274f11f73df2856c7c1f271e6860216d32afb573 Mon Sep 17 00:00:00 2001 From: Juan Narvaez Date: Tue, 19 Mar 2013 09:12:56 -0500 Subject: [PATCH] Changing static variables to volatile. --- src/main/java/org/xerial/snappy/SnappyLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/xerial/snappy/SnappyLoader.java b/src/main/java/org/xerial/snappy/SnappyLoader.java index 96ee629..99b0e7a 100755 --- a/src/main/java/org/xerial/snappy/SnappyLoader.java +++ b/src/main/java/org/xerial/snappy/SnappyLoader.java @@ -93,8 +93,8 @@ public class SnappyLoader public static final String KEY_SNAPPY_USE_SYSTEMLIB = "org.xerial.snappy.use.systemlib"; public static final String KEY_SNAPPY_DISABLE_BUNDLED_LIBS = "org.xerial.snappy.disable.bundled.libs"; // Depreciated, but preserved for backward compatibility - private static boolean isLoaded = false; - private static Object api = null; + private static volatile boolean isLoaded = false; + private static volatile Object api = null; /** * Set the api instance.