DATAREDIS-435 - Fix potential NPE in RedisTestProfileValueSource.

This commit is contained in:
Christoph Strobl
2015-10-27 08:17:45 +01:00
parent 130c057acd
commit 3d7a524474

View File

@@ -109,6 +109,10 @@ public class RedisTestProfileValueSource implements ProfileValueSource {
}
public static boolean matches(String key, String value) {
if (INSTANCE == null) {
INSTANCE = new RedisTestProfileValueSource();
}
return INSTANCE.get(key) != null ? INSTANCE.get(key).equals(value) : value == null;
}
}