@Test public void testListAbnormal() { MyConfigurationManager myManager = new MyConfigurationManager(); DefaultTypedProperty<List<String>> p = (DefaultTypedProperty<List<String>>) myManager.getProperty("list", "lKey", "1112,,,2345,,12341,,, "); assertTrue(p.typedValue().size() == 3); p = (DefaultTypedProperty<List<String>>) myManager.getProperty("list", "lKey", " "); assertNull(p.typedValue()); p = (DefaultTypedProperty<List<String>>) myManager.getProperty("list", "lKey", null); assertNull(p.typedValue()); p = (DefaultTypedProperty<List<String>>) myManager.getProperty("list", "lKey", ", , ,, "); assertNull(p.typedValue()); System.out.println(p.typedValue()); }
@Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } DefaultTypedConfigurationManager(ConfigurationManager manager); }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } DefaultTypedConfigurationManager(ConfigurationManager manager); @Override TypedProperty<T> getProperty(String key, ValueParser<T> valueParser); }
DefaultTypedConfigurationManager extends ConfigurationManagerWrapper implements TypedConfigurationManager { @Override public <T> TypedProperty<T> getProperty(String key, ValueParser<T> valueParser) { return new DefaultTypedProperty<T>(getProperty(key), valueParser); } DefaultTypedConfigurationManager(ConfigurationManager manager); @Override TypedProperty<T> getProperty(String key, ValueParser<T> valueParser);  }