Source:
<code>protected Collection<JcloudsLocationCustomizer> getCustomizers(ConfigBag setup) { JcloudsLocationCustomizer customizer = setup.get(JCLOUDS_LOCATION_CUSTOMIZER); Collection<JcloudsLocationCustomizer> customizers = setup.get(JCLOUDS_LOCATION_CUSTOMIZERS); String customizerType = setup.get(JCLOUDS_LOCATION_CUSTOMIZER_TYPE); String customizersSupplierType = setup.get(JCLOUDS_LOCATION_CUSTOMIZERS_SUPPLIER_TYPE); ClassLoader catalogClassLoader = getManagementContext().getCatalog().getRootClassLoader(); List<JcloudsLocationCustomizer> result = new ArrayList<JcloudsLocationCustomizer>(); if (customizer != null) result.add(customizer); if (customizers != null) result.addAll(customizers); if (Strings.isNonBlank(customizerType)) { Optional<JcloudsLocationCustomizer> customizerByType = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizerType, setup); if (customizerByType.isPresent()) { result.add(customizerByType.get()); } else { customizerByType = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizerType); if (customizerByType.isPresent()) { result.add(customizerByType.get()); } else { <START> throw new IllegalStateException("Failed to load JcloudsLocationCustomizer "+customizersSupplierType+" for location "+this); <END> } } } if (Strings.isNonBlank(customizersSupplierType)) { Optional<Supplier<Collection<JcloudsLocationCustomizer>>> supplier = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizersSupplierType, setup); if (supplier.isPresent()) { result.addAll(supplier.get().get()); } else { supplier = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizersSupplierType); if (supplier.isPresent()) { result.addAll(supplier.get().get()); } else { throw new IllegalStateException("Failed to load JcloudsLocationCustomizer supplier "+customizersSupplierType+" for location "+this); } } } return result; }</code><technical_language>"failed instantiate", "failed load"</technical_language>

Target:
protected Collection<JcloudsLocationCustomizer> getCustomizers(ConfigBag setup) { JcloudsLocationCustomizer customizer = setup.get(JCLOUDS_LOCATION_CUSTOMIZER); Collection<JcloudsLocationCustomizer> customizers = setup.get(JCLOUDS_LOCATION_CUSTOMIZERS); String customizerType = setup.get(JCLOUDS_LOCATION_CUSTOMIZER_TYPE); String customizersSupplierType = setup.get(JCLOUDS_LOCATION_CUSTOMIZERS_SUPPLIER_TYPE); ClassLoader catalogClassLoader = getManagementContext().getCatalog().getRootClassLoader(); List<JcloudsLocationCustomizer> result = new ArrayList<JcloudsLocationCustomizer>(); if (customizer != null) result.add(customizer); if (customizers != null) result.addAll(customizers); if (Strings.isNonBlank(customizerType)) { Optional<JcloudsLocationCustomizer> customizerByType = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizerType, setup); if (customizerByType.isPresent()) { result.add(customizerByType.get()); } else { customizerByType = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizerType); if (customizerByType.isPresent()) { result.add(customizerByType.get()); } else { throw new IllegalStateException("Failed to create JcloudsLocationCustomizer "+customizersSupplierType+" for location "+this); } } } if (Strings.isNonBlank(customizersSupplierType)) { Optional<Supplier<Collection<JcloudsLocationCustomizer>>> supplier = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizersSupplierType, setup); if (supplier.isPresent()) { result.addAll(supplier.get().get()); } else { supplier = Reflections.invokeConstructorWithArgs(catalogClassLoader, customizersSupplierType); if (supplier.isPresent()) { result.addAll(supplier.get().get()); } else { throw new IllegalStateException("Failed to create JcloudsLocationCustomizer supplier "+customizersSupplierType+" for location "+this); } } } return result; }