@Test public void featureSysOverride() { Features features = new Features(); assertFalse(features.isAvailable("A")); System.setProperty("org.infinispan.feature.A", "true"); System.setProperty("org.infinispan.feature.B", "false"); boolean a = features.isAvailable("A"); boolean b = features.isAvailable("B"); System.clearProperty("org.infinispan.feature.A"); System.clearProperty("org.infinispan.feature.B"); assertTrue(a); assertFalse(b); }
public boolean isAvailable(String featureName) { String name = FEATURE_PREFIX + featureName; String sysprop = SecurityActions.getProperty(name); if (sysprop != null) { return Boolean.parseBoolean(sysprop); } else { return Boolean.parseBoolean(features.getProperty(name, "true")); } }
Features { public boolean isAvailable(String featureName) { String name = FEATURE_PREFIX + featureName; String sysprop = SecurityActions.getProperty(name); if (sysprop != null) { return Boolean.parseBoolean(sysprop); } else { return Boolean.parseBoolean(features.getProperty(name, "true")); } } }
Features { public boolean isAvailable(String featureName) { String name = FEATURE_PREFIX + featureName; String sysprop = SecurityActions.getProperty(name); if (sysprop != null) { return Boolean.parseBoolean(sysprop); } else { return Boolean.parseBoolean(features.getProperty(name, "true")); } } Features(ClassLoader classLoader);  Features(); }
Features { public boolean isAvailable(String featureName) { String name = FEATURE_PREFIX + featureName; String sysprop = SecurityActions.getProperty(name); if (sysprop != null) { return Boolean.parseBoolean(sysprop); } else { return Boolean.parseBoolean(features.getProperty(name, "true")); } } Features(ClassLoader classLoader);  Features(); boolean isAvailable(String featureName); }
Features { public boolean isAvailable(String featureName) { String name = FEATURE_PREFIX + featureName; String sysprop = SecurityActions.getProperty(name); if (sysprop != null) { return Boolean.parseBoolean(sysprop); } else { return Boolean.parseBoolean(features.getProperty(name, "true")); } } Features(ClassLoader classLoader);  Features(); boolean isAvailable(String featureName); static final String FEATURE_PREFIX; }