private Object getInjectedValue(ConfigurationMetadata.InjectionPointMetaData injectionPoint, String prefix) throws InvalidConfigurationException { // Get the property value String name = prefix + injectionPoint.getProperty(); String value = properties.get(name); if (value == null) { return null; } // coerce the property value to the final type Class<?> propertyType = injectionPoint.getSetter().getParameterTypes()[0]; Object finalValue = coerce(propertyType, value); if (finalValue == null) { throw new InvalidConfigurationException(format("Could not coerce value '%s' to %s (property '%s') in order to call [%s]", value, propertyType.getName(), injectionPoint.getProperty(), injectionPoint.getSetter().toGenericString())); } usedProperties.add(name); return finalValue; }
private Object getInjectedValue(AttributeMetadata attribute, ConfigurationMetadata.InjectionPointMetaData injectionPoint, String prefix) throws InvalidConfigurationException { // Get the property value String name = prefix + injectionPoint.getProperty(); String value = properties.get(name); String printableValue = value; if (attribute.isSecuritySensitive()) { printableValue = "[REDACTED]"; } if (value == null) { return null; } // coerce the property value to the final type Class<?> propertyType = injectionPoint.getSetter().getParameterTypes()[0]; Object finalValue = coerce(propertyType, value); if (finalValue == null) { throw new InvalidConfigurationException(format("Could not coerce value '%s' to %s (property '%s') in order to call [%s]", printableValue, propertyType.getName(), name, injectionPoint.getSetter().toGenericString())); } usedProperties.add(name); return finalValue; }
private Object getInjectedValue(AttributeMetadata attribute, ConfigurationMetadata.InjectionPointMetaData injectionPoint, String prefix) throws InvalidConfigurationException { // Get the property value String name = prefix + injectionPoint.getProperty(); String value = properties.get(name); String printableValue = value; if (attribute.isSecuritySensitive()) { printableValue = "[REDACTED]"; } if (value == null) { return null; } // coerce the property value to the final type Class<?> propertyType = injectionPoint.getSetter().getParameterTypes()[0]; Object finalValue = coerce(propertyType, value); if (finalValue == null) { throw new InvalidConfigurationException(format("Could not coerce value '%s' to %s (property '%s') in order to call [%s]", printableValue, propertyType.getName(), name, injectionPoint.getSetter().toGenericString())); } usedProperties.add(name); return finalValue; }