Source:
<code><START> public void requestSetConfiguration(final DlmsDeviceMessageMetadata messageMetadata, <END> final SetConfigurationObjectRequest setConfigurationObjectRequest) throws OsgpException, ProtocolAdapterException { LnClientConnection conn = null; try { final ConfigurationObject configurationObject = setConfigurationObjectRequest .getSetConfigurationObjectRequestData().getConfigurationObject(); final GprsOperationModeType gprsOperationModeType = configurationObject.getGprsOperationMode(); final ConfigurationFlags configurationFlags = configurationObject.getConfigurationFlags(); LOGGER.info("******************************************************"); LOGGER.info("******** Configuration Object: 0-0:94.31.3.255 *******"); LOGGER.info("******************************************************"); LOGGER.info("Operation mode:{} ", gprsOperationModeType.value()); LOGGER.info("Flags:"); for (final ConfigurationFlag configurationFlag : configurationFlags.getConfigurationFlag()) { LOGGER.info("Flag : {}, enabled = {}", configurationFlag.getConfigurationFlagType().toString(), configurationFlag.isEnabled()); } LOGGER.info("******************************************************"); final DlmsDevice device = this.domainHelperService.findDlmsDevice(messageMetadata); conn = this.dlmsConnectionFactory.getConnection(device); final AccessResultCode accessResultCode = this.setConfigurationObjectCommandExecutor.execute(conn, device, configurationObject); if (!AccessResultCode.SUCCESS.equals(accessResultCode)) { throw new ProtocolAdapterException("Set configuration object reported result is: " + accessResultCode); } } finally { if (conn != null) { conn.close(); } } }</code><technical_language>![MAJOR](<LINK_1> Refactor this method throw checked exception instead of: com.alliander.osgp.shared.exceptionhandling.OsgpException, org.osgp.adapter.protocol.dlms.exceptions.ProtocolAdapterException [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
public void requestSetConfiguration(final DlmsDeviceMessageMetadata messageMetadata, final SetConfigurationObjectRequest setConfigurationObjectRequest) throws OsgpException, ProtocolAdapterException { LnClientConnection conn = null; try { final ConfigurationObject configurationObject = setConfigurationObjectRequest .getSetConfigurationObjectRequestData().getConfigurationObject(); final GprsOperationModeType gprsOperationModeType = configurationObject.getGprsOperationMode(); final ConfigurationFlags configurationFlags = configurationObject.getConfigurationFlags(); LOGGER.info(VISUAL_SEPARATOR); LOGGER.info("******** Configuration Object: 0-0:94.31.3.255 *******"); LOGGER.info(VISUAL_SEPARATOR); LOGGER.info("Operation mode:{} ", gprsOperationModeType.value()); LOGGER.info("Flags:"); for (final ConfigurationFlag configurationFlag : configurationFlags.getConfigurationFlag()) { LOGGER.info("Flag : {}, enabled = {}", configurationFlag.getConfigurationFlagType().toString(), configurationFlag.isEnabled()); } LOGGER.info(VISUAL_SEPARATOR); final DlmsDevice device = this.domainHelperService.findDlmsDevice(messageMetadata); conn = this.dlmsConnectionFactory.getConnection(device); final AccessResultCode accessResultCode = this.setConfigurationObjectCommandExecutor.execute(conn, device, configurationObject); if (!AccessResultCode.SUCCESS.equals(accessResultCode)) { throw new ProtocolAdapterException("Set configuration object reported result is: " + accessResultCode); } } finally { if (conn != null) { conn.close(); } } }