private <T> T tryGet(Property<T> property, Function<String, T> converter) { String fullKeyName = this.keyPrefix + property.getName(); // Get value from config. String value = this.properties.getProperty(fullKeyName, null); if (value == null) { // 2. Nothing in the configuration for this Property. if (property.hasDefaultValue()) { return property.getDefaultValue(); } else { throw new MissingPropertyException(fullKeyName); } } try { return converter.apply(value.trim()); } catch (IllegalArgumentException ex) { throw new InvalidPropertyValueException(fullKeyName, value, ex); } }
@SuppressWarnings("rawtypes") Property p = (Property) f.get(null); if (p.getDefaultValue() != null && p.getDefaultValue() instanceof Boolean) { configBuilder.with(p, nextValue.incrementAndGet() % 2 == 0); } else {
if (ipAddress == null || ipAddress.equals(LISTENING_IP_ADDRESS.getDefaultValue())) {