Source:
public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException { super.processBindingConfiguration(context, item, bindingConfig); MCP23017BindingConfig config = new MCP23017BindingConfig(); JsonParserFactory factory=JsonParserFactory.getInstance(); JSONParser parser=factory.newJsonParser(); @SuppressWarnings("unchecked") Map<String, Object> jsonData=parser.parseJson(bindingConfig); try { logger.debug("processingBindingConfiguration in context " + context); config.setBusAddress(Integer.parseInt((String) jsonData.get("address"),16)); config.setPin((Pin) MCP23017Pin.class.getField("GPIO_" + (String) jsonData.get("pin")).get(null)); config.setPinMode(PinMode.valueOf((String) jsonData.get("mode"))); if(item instanceof SwitchItem) { config.setDefaultState(PinState.valueOf((String) jsonData.get("defaultState"))); } } catch (IllegalArgumentException e) { logger.error("Illegal Argument Exception in configuration string '" + bindingConfig + "' " + e.getMessage()); throw new BindingConfigParseException("Illegal Access Exception in configuration string '" + bindingConfig + "'"); } catch (IllegalAccessException e) { logger.error("Illegal Argument Exception in configuration string '" + bindingConfig + "' " + e.getMessage()); throw new BindingConfigParseException("Illegal Argument Exception in configuration string '" + bindingConfig + "'"); } catch (NoSuchFieldException e) { logger.error("No Such Field Exception in configuration string '" + bindingConfig + "' " + e.getMessage()); throw new BindingConfigParseException("No Such Field Exception in configuration string '" + bindingConfig + "'"); } catch (SecurityException e) { logger.error("Security Exception in configuration string '" + bindingConfig + "' " + e.getMessage()); throw new BindingConfigParseException("Security Exception in configuration string '" + bindingConfig + "'"); } addBindingConfig(item, config); }

Target:
public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException { super.processBindingConfiguration(context, item, bindingConfig); MCP23017BindingConfig config = new MCP23017BindingConfig(); JsonParserFactory factory = JsonParserFactory.getInstance(); JSONParser parser = factory.newJsonParser(); @SuppressWarnings("unchecked") Map<String, Object> jsonData = parser.parseJson(bindingConfig); try { logger.debug("Process binding configuration in context {}", context); config.setBusAddress(Integer.parseInt((String) jsonData.get("address"), 16)); config.setPin((Pin) MCP23017Pin.class.getField("GPIO_" + (String) jsonData.get("pin")).get(null)); config.setPinMode(PinMode.valueOf((String) jsonData.get("mode"))); if (item instanceof SwitchItem) { config.setDefaultState(PinState.valueOf((String) jsonData.get("defaultState"))); } } catch (IllegalArgumentException exception) { final String message = "Illegal argument exception in configuration string "; logger.error("{} '{}': {}", message, bindingConfig, exception.getMessage()); throw new BindingConfigParseException(message + "'" + bindingConfig + "'"); } catch (IllegalAccessException exception) { final String message = "Illegal access exception in configuration string "; logger.error("{} '{}': {}", message, bindingConfig, exception.getMessage()); throw new BindingConfigParseException(message + "'" + bindingConfig + "'"); } catch (NoSuchFieldException exception) { final String message = "No such field exception in configuration string "; logger.error("{} '{}': {}", message, bindingConfig, exception.getMessage()); throw new BindingConfigParseException(message + "'" + bindingConfig + "'"); } catch (SecurityException exception) { final String message = "Security exception in configuration string "; logger.error("{} '{}': {}", message, bindingConfig, exception.getMessage()); throw new BindingConfigParseException(message + "'" + bindingConfig + "'"); } addBindingConfig(item, config); }