DATAREDIS-435 - Fix potential NPE in RedisTestProfileValueSource.

This commit is contained in:
Christoph Strobl
2015-10-27 08:17:45 +01:00
parent 77b88e2fbc
commit 3d8aeb3219

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;
}
}