test_class.declarator: configUri = URI.create("system:ephemeris")
test_class.modifier: private final
test_class.original_string: private final URI configUri = URI.create("system:ephemeris");
test_class.type: URI
test_class.var_name: configUri
test_class.declarator: configDescriptionParameterBuilder1 = ConfigDescriptionParameterBuilder
              .create("p1", DECIMAL).withMultiple(true).withMultipleLimit(7)
test_class.modifier: private final
test_class.original_string: private final ConfigDescriptionParameterBuilder configDescriptionParameterBuilder1 = ConfigDescriptionParameterBuilder
              .create("p1", DECIMAL).withMultiple(true).withMultipleLimit(7);
test_class.type: ConfigDescriptionParameterBuilder
test_class.var_name: configDescriptionParameterBuilder1
test_class.declarator: configDescriptionParameterBuilder2 = ConfigDescriptionParameterBuilder
              .create("p2", TEXT).withMultiple(true).withMultipleLimit(2)
test_class.modifier: private final
test_class.original_string: private final ConfigDescriptionParameterBuilder configDescriptionParameterBuilder2 = ConfigDescriptionParameterBuilder
              .create("p2", TEXT).withMultiple(true).withMultipleLimit(2);
test_class.type: ConfigDescriptionParameterBuilder
test_class.var_name: configDescriptionParameterBuilder2
test_class.file: bundles/org.openhab.core.config.core/src/test/java/org/openhab/core/config/core/ConfigUtilTest.java
test_class.identifier: ConfigUtilTest
test_case.body: @Test
      public void verifyApplyDefaultConfigurationReturnsAListWithMultipleValues() {
          configDescriptionParameterBuilder1.withDefault("2.3,2.4,2.5");
  
          Configuration configuration = new Configuration();
          ConfigDescription configDescription = ConfigDescriptionBuilder.create(configUri)
                  .withParameter(configDescriptionParameterBuilder1.build()).build();
  
          ConfigUtil.applyDefaultConfiguration(configuration, configDescription);
          verifyValuesOfConfiguration(configuration.get("p1"), 3,
                  List.of(new BigDecimal("2.3"), new BigDecimal("2.4"), new BigDecimal("2.5")));
      }
test_case.class_method_signature: ConfigUtilTest.verifyApplyDefaultConfigurationReturnsAListWithMultipleValues()
test_case.full_signature: @Test public void verifyApplyDefaultConfigurationReturnsAListWithMultipleValues()
test_case.identifier: verifyApplyDefaultConfigurationReturnsAListWithMultipleValues
test_case.invocations: withDefault build withParameter create build applyDefaultConfiguration verifyValuesOfConfiguration get of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void verifyApplyDefaultConfigurationReturnsAListWithMultipleValues()
focal_class.declarator: DEFAULT_LIST_DELIMITER = ","
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_LIST_DELIMITER = ",";
focal_class.type: String
focal_class.var_name: DEFAULT_LIST_DELIMITER
focal_class.file: bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigUtil.java
focal_class.identifier: ConfigUtil
focal_class.class_method_signature: ConfigUtil.getDefaultValueAsCorrectType(ConfigDescriptionParameter parameter)
focal_class.full_signature: public static @Nullable Object getDefaultValueAsCorrectType(ConfigDescriptionParameter parameter)
focal_class.identifier: getDefaultValueAsCorrectType
focal_class.modifiers: public static @Nullable
focal_class.parameters: (ConfigDescriptionParameter parameter)
focal_class.return: Object
focal_class.signature: Object getDefaultValueAsCorrectType(ConfigDescriptionParameter parameter)
focal_class.class_method_signature: ConfigUtil.getDefaultValueAsCorrectType(String parameterName, Type parameterType,
              String defaultValue)
focal_class.full_signature: static @Nullable Object getDefaultValueAsCorrectType(String parameterName, Type parameterType,
              String defaultValue)
focal_class.identifier: getDefaultValueAsCorrectType
focal_class.modifiers: static @Nullable
focal_class.parameters: (String parameterName, Type parameterType,
              String defaultValue)
focal_class.return: Object
focal_class.signature: Object getDefaultValueAsCorrectType(String parameterName, Type parameterType,
              String defaultValue)
focal_class.class_method_signature: ConfigUtil.getNumberOfDecimalPlaces(BigDecimal bigDecimal)
focal_class.full_signature: static int getNumberOfDecimalPlaces(BigDecimal bigDecimal)
focal_class.identifier: getNumberOfDecimalPlaces
focal_class.modifiers: static
focal_class.parameters: (BigDecimal bigDecimal)
focal_class.return: int
focal_class.signature: int getNumberOfDecimalPlaces(BigDecimal bigDecimal)
focal_class.class_method_signature: ConfigUtil.applyDefaultConfiguration(Configuration configuration,
              @Nullable ConfigDescription configDescription)
focal_class.full_signature: public static void applyDefaultConfiguration(Configuration configuration,
              @Nullable ConfigDescription configDescription)
focal_class.identifier: applyDefaultConfiguration
focal_class.modifiers: public static
focal_class.parameters: (Configuration configuration,
              @Nullable ConfigDescription configDescription)
focal_class.return: void
focal_class.signature: void applyDefaultConfiguration(Configuration configuration,
              @Nullable ConfigDescription configDescription)
focal_class.class_method_signature: ConfigUtil.normalizeTypes(Map<String, @Nullable Object> configuration)
focal_class.full_signature: public static Map<String, @Nullable Object> normalizeTypes(Map<String, @Nullable Object> configuration)
focal_class.identifier: normalizeTypes
focal_class.modifiers: public static
focal_class.parameters: (Map<String, @Nullable Object> configuration)
focal_class.return: Map<String, @Nullable Object>
focal_class.signature: Map<String, @Nullable Object> normalizeTypes(Map<String, @Nullable Object> configuration)
focal_class.class_method_signature: ConfigUtil.normalizeType(Object value, @Nullable ConfigDescriptionParameter configDescriptionParameter)
focal_class.full_signature: public static Object normalizeType(Object value, @Nullable ConfigDescriptionParameter configDescriptionParameter)
focal_class.identifier: normalizeType
focal_class.modifiers: public static
focal_class.parameters: (Object value, @Nullable ConfigDescriptionParameter configDescriptionParameter)
focal_class.return: Object
focal_class.signature: Object normalizeType(Object value, @Nullable ConfigDescriptionParameter configDescriptionParameter)
focal_class.class_method_signature: ConfigUtil.normalizeTypes(@Nullable Map<String, Object> configuration,
              List<ConfigDescription> configDescriptions)
focal_class.full_signature: public static @Nullable Map<String, Object> normalizeTypes(@Nullable Map<String, Object> configuration,
              List<ConfigDescription> configDescriptions)
focal_class.identifier: normalizeTypes
focal_class.modifiers: public static @Nullable
focal_class.parameters: (@Nullable Map<String, Object> configuration,
              List<ConfigDescription> configDescriptions)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> normalizeTypes(@Nullable Map<String, Object> configuration,
              List<ConfigDescription> configDescriptions)
focal_class.class_method_signature: ConfigUtil.normalizeType(Object value)
focal_class.full_signature: public static Object normalizeType(Object value)
focal_class.identifier: normalizeType
focal_class.modifiers: public static
focal_class.parameters: (Object value)
focal_class.return: Object
focal_class.signature: Object normalizeType(Object value)
focal_class.class_method_signature: ConfigUtil.normalizeCollection(Collection<?> collection)
focal_class.full_signature: private static Collection<Object> normalizeCollection(Collection<?> collection)
focal_class.identifier: normalizeCollection
focal_class.modifiers: private static
focal_class.parameters: (Collection<?> collection)
focal_class.return: Collection<Object>
focal_class.signature: Collection<Object> normalizeCollection(Collection<?> collection)
focal_class.class_method_signature: ConfigUtil.isOSGiConfigParameter(String name)
focal_class.full_signature: private static boolean isOSGiConfigParameter(String name)
focal_class.identifier: isOSGiConfigParameter
focal_class.modifiers: private static
focal_class.parameters: (String name)
focal_class.return: boolean
focal_class.signature: boolean isOSGiConfigParameter(String name)
focal_method.body: public static void applyDefaultConfiguration(Configuration configuration,
              @Nullable ConfigDescription configDescription) {
          if (configDescription != null) {
              for (ConfigDescriptionParameter parameter : configDescription.getParameters()) {
                  String defaultValue = parameter.getDefault();
                  if (defaultValue != null && configuration.get(parameter.getName()) == null) {
                      if (parameter.isMultiple()) {
                          if (defaultValue.contains(DEFAULT_LIST_DELIMITER)) {
                              List<Object> values = (List<Object>) List.of(defaultValue.split(DEFAULT_LIST_DELIMITER))
                                      .stream() //
                                      .map(String::trim) //
                                      .filter(not(String::isEmpty)) //
                                      .map(value -> ConfigUtil.getDefaultValueAsCorrectType(parameter.getName(),
                                              parameter.getType(), value)) //
                                      .filter(Objects::nonNull) //
                                      .collect(Collectors.toList());
                              Integer multipleLimit = parameter.getMultipleLimit();
                              if (multipleLimit != null && values.size() > multipleLimit.intValue()) {
                                  LoggerFactory.getLogger(ConfigUtil.class).warn(
                                          "Number of default values ({}) for parameter '{}' is greater than multiple limit ({})",
                                          values.size(), parameter.getName(), multipleLimit);
                              }
                              configuration.put(parameter.getName(), values);
                          } else {
                              Object value = ConfigUtil.getDefaultValueAsCorrectType(parameter);
                              if (value != null) {
                                  configuration.put(parameter.getName(), Arrays.asList(value));
                              }
                          }
                      } else {
                          Object value = ConfigUtil.getDefaultValueAsCorrectType(parameter);
                          if (value != null) {
                              configuration.put(parameter.getName(), value);
                          }
                      }
                  }
              }
          }
      }
focal_method.class_method_signature: ConfigUtil.applyDefaultConfiguration(Configuration configuration,
              @Nullable ConfigDescription configDescription)
focal_method.full_signature: public static void applyDefaultConfiguration(Configuration configuration,
              @Nullable ConfigDescription configDescription)
focal_method.identifier: applyDefaultConfiguration
focal_method.invocations: getParameters getDefault get getName isMultiple contains collect filter map filter map stream of split not getDefaultValueAsCorrectType getName getType toList getMultipleLimit size intValue warn getLogger size getName put getName getDefaultValueAsCorrectType put getName asList getDefaultValueAsCorrectType put getName
focal_method.modifiers: public static
focal_method.parameters: (Configuration configuration,
              @Nullable ConfigDescription configDescription)
focal_method.return: void
focal_method.signature: void applyDefaultConfiguration(Configuration configuration,
              @Nullable ConfigDescription configDescription)