DATAREDIS-435 - Fix potential NPE in RedisTestProfileValueSource.

This commit is contained in:
Christoph Strobl
2015-10-27 08:17:45 +01:00
parent b2dd94d994
commit b5f0fcde99

View File

@@ -88,6 +88,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;
}
}