Source:
<code>public void installPlugin(Plugin plugin) { for (BlockEncodingFactory<?> blockEncodingFactory : plugin.getBlockEncodingFactories(blockEncodingManager)) { log.info("Registering block encoding %s", blockEncodingFactory.getName()); blockEncodingManager.addBlockEncodingFactory(blockEncodingFactory); } for (Type type : plugin.getTypes()) { log.info("Registering type %s", type.getTypeSignature()); typeRegistry.addType(type); } for (ParametricType parametricType : plugin.getParametricTypes()) { log.info("Registering parametric type %s", parametricType.getName()); typeRegistry.addParametricType(parametricType); } for (ConnectorFactory connectorFactory : plugin.getConnectorFactories()) { log.info("Registering connector %s", connectorFactory.getName()); connectorManager.addConnectorFactory(connectorFactory); } for (Class<?> functionClass : plugin.getFunctions()) { log.info("Registering functions from %s", functionClass.getName()); metadata.addFunctions(extractFunctions(functionClass)); } for (SessionPropertyConfigurationManagerFactory sessionConfigFactory : plugin.getSessionPropertyConfigurationManagerFactories()) { log.info("Registering session property configuration manager %s", sessionConfigFactory.getName()); sessionSupplier.addConfigurationManager(sessionConfigFactory); } for (ResourceGroupConfigurationManagerFactory configurationManagerFactory : plugin.getResourceGroupConfigurationManagerFactories()) { log.info("Registering resource group configuration manager %s", configurationManagerFactory.getName()); resourceGroupManager.addConfigurationManagerFactory(configurationManagerFactory); } for (SystemAccessControlFactory accessControlFactory : plugin.getSystemAccessControlFactories()) { log.info("Registering system access control %s", accessControlFactory.getName()); accessControlManager.addSystemAccessControlFactory(accessControlFactory); } for (PasswordAuthenticatorFactory authenticatorFactory : plugin.getPasswordAuthenticatorFactories()) { log.info("Registering password authenticator %s", authenticatorFactory.getName()); <START> passwordAuthenticatorManager.ifPresent(manager -> manager.addPasswordAuthenticatorFactory(authenticatorFactory)); <END> } for (EventListenerFactory eventListenerFactory : plugin.getEventListenerFactories()) { log.info("Registering event listener %s", eventListenerFactory.getName()); eventListenerManager.addEventListenerFactory(eventListenerFactory); } }</code><technical_language>nit: Technically registering if pAM is set. want skip log in case reflect situation in log message</technical_language>

Target:
public void installPlugin(Plugin plugin) { for (BlockEncodingFactory<?> blockEncodingFactory : plugin.getBlockEncodingFactories(blockEncodingManager)) { log.info("Registering block encoding %s", blockEncodingFactory.getName()); blockEncodingManager.addBlockEncodingFactory(blockEncodingFactory); } for (Type type : plugin.getTypes()) { log.info("Registering type %s", type.getTypeSignature()); typeRegistry.addType(type); } for (ParametricType parametricType : plugin.getParametricTypes()) { log.info("Registering parametric type %s", parametricType.getName()); typeRegistry.addParametricType(parametricType); } for (ConnectorFactory connectorFactory : plugin.getConnectorFactories()) { log.info("Registering connector %s", connectorFactory.getName()); connectorManager.addConnectorFactory(connectorFactory); } for (Class<?> functionClass : plugin.getFunctions()) { log.info("Registering functions from %s", functionClass.getName()); metadata.addFunctions(extractFunctions(functionClass)); } for (SessionPropertyConfigurationManagerFactory sessionConfigFactory : plugin.getSessionPropertyConfigurationManagerFactories()) { log.info("Registering session property configuration manager %s", sessionConfigFactory.getName()); sessionSupplier.addConfigurationManager(sessionConfigFactory); } for (ResourceGroupConfigurationManagerFactory configurationManagerFactory : plugin.getResourceGroupConfigurationManagerFactories()) { log.info("Registering resource group configuration manager %s", configurationManagerFactory.getName()); resourceGroupManager.addConfigurationManagerFactory(configurationManagerFactory); } for (SystemAccessControlFactory accessControlFactory : plugin.getSystemAccessControlFactories()) { log.info("Registering system access control %s", accessControlFactory.getName()); accessControlManager.addSystemAccessControlFactory(accessControlFactory); } for (PasswordAuthenticatorFactory authenticatorFactory : plugin.getPasswordAuthenticatorFactories()) { log.info("Registering password authenticator %s", authenticatorFactory.getName()); passwordAuthenticatorManager.addPasswordAuthenticatorFactory(authenticatorFactory); } for (EventListenerFactory eventListenerFactory : plugin.getEventListenerFactories()) { log.info("Registering event listener %s", eventListenerFactory.getName()); eventListenerManager.addEventListenerFactory(eventListenerFactory); } }