Source:
<code>public Converter newConverter(AbstractConfig config, String classPropertyName, ClassLoaderUsage classLoaderUsage) { if (!config.originals().containsKey(classPropertyName) && !isInternalConverter(classPropertyName)) { return null; } Converter plugin = null; <START> ClassLoader savedLoader = null; <END> Class<? extends Converter> klass = null; switch (classLoaderUsage) { case CURRENT_CLASSLOADER: try { klass = pluginClassFromConfig(config, classPropertyName, Converter.class); } catch (ClassNotFoundException e) { throw new ConnectException( "Failed to find any class that implements Converter for the config " + classPropertyName + ", available converters are: " + pluginNames(delegatingLoader.converters()) ); } break; case PLUGINS: String converterClassOrAlias = config.getClass(classPropertyName).getName(); try { klass = pluginClass(delegatingLoader, converterClassOrAlias, Converter.class); } catch (ClassNotFoundException e) { throw new ConnectException( "Failed to find any class that implements Converter and which name matches " + converterClassOrAlias + ", available converters are: " + pluginNames(delegatingLoader.converters()) ); } break; } if (klass == null) { throw new ConnectException("Unable to initialize the Converter specified in '" + classPropertyName + "'"); } savedLoader = compareAndSwapLoaders(klass.getClassLoader()); try { plugin = newPlugin(klass); @SuppressWarnings("deprecation") final boolean isKeyConverter = WorkerConfig.KEY_CONVERTER_CLASS_CONFIG.equals(classPropertyName) || WorkerConfig.INTERNAL_KEY_CONVERTER_CLASS_CONFIG.equals(classPropertyName); String configPrefix = classPropertyName + "."; Map<String, Object> converterConfig = config.originalsWithPrefix(configPrefix); log.debug("Configuring the converter with configuration keys:{}{}", isKeyConverter ? "key" : "value", System.lineSeparator(), converterConfig.keySet()); if (plugin instanceof JsonConverter && isInternalConverter(classPropertyName)) { if (!converterConfig.containsKey(JsonConverterConfig.SCHEMAS_ENABLE_CONFIG)) { converterConfig.put(JsonConverterConfig.SCHEMAS_ENABLE_CONFIG, false); } } plugin.configure(converterConfig, isKeyConverter); } finally { compareAndSwapLoaders(savedLoader); } return plugin; }</code><technical_language>declaration is here, used? leftover</technical_language>

Target:
public Converter newConverter(AbstractConfig config, String classPropertyName, ClassLoaderUsage classLoaderUsage) { if (!config.originals().containsKey(classPropertyName) && !isInternalConverter(classPropertyName)) { return null; } Converter plugin = null; Class<? extends Converter> klass = null; switch (classLoaderUsage) { case CURRENT_CLASSLOADER: try { klass = pluginClassFromConfig(config, classPropertyName, Converter.class); } catch (ClassNotFoundException e) { throw new ConnectException( "Failed to find any class that implements Converter for the config " + classPropertyName + ", available converters are: " + pluginNames(delegatingLoader.converters()) ); } break; case PLUGINS: String converterClassOrAlias = config.getClass(classPropertyName).getName(); try { klass = pluginClass(delegatingLoader, converterClassOrAlias, Converter.class); } catch (ClassNotFoundException e) { throw new ConnectException( "Failed to find any class that implements Converter and which name matches " + converterClassOrAlias + ", available converters are: " + pluginNames(delegatingLoader.converters()) ); } break; } if (klass == null) { throw new ConnectException("Unable to initialize the Converter specified in '" + classPropertyName + "'"); } ClassLoader savedLoader = compareAndSwapLoaders(klass.getClassLoader()); try { plugin = newPlugin(klass); @SuppressWarnings("deprecation") final boolean isKeyConverter = WorkerConfig.KEY_CONVERTER_CLASS_CONFIG.equals(classPropertyName) || WorkerConfig.INTERNAL_KEY_CONVERTER_CLASS_CONFIG.equals(classPropertyName); String configPrefix = classPropertyName + "."; Map<String, Object> converterConfig = config.originalsWithPrefix(configPrefix); log.debug("Configuring the converter with configuration keys:{}{}", isKeyConverter ? "key" : "value", System.lineSeparator(), converterConfig.keySet()); if (plugin instanceof JsonConverter && isInternalConverter(classPropertyName)) { if (!converterConfig.containsKey(JsonConverterConfig.SCHEMAS_ENABLE_CONFIG)) { converterConfig.put(JsonConverterConfig.SCHEMAS_ENABLE_CONFIG, false); } } plugin.configure(converterConfig, isKeyConverter); } finally { compareAndSwapLoaders(savedLoader); } return plugin; }