Source:
<code>public void updateForLocation( final String pid, String location, Map<String, Object> configurationTable) throws IOException { if (pid == null || pid.length() < 1) { throw loggedException("Argument pid cannot be null or empty"); } if (configurationTable == null) { throw loggedException("Argument configurationTable cannot be null"); } Configuration config = configurationAdmin.getConfiguration(pid, location); if (isPermittedToViewService(config.getPid())) { final Metatype metatype = configurationAdminImpl.findMetatypeForConfig(config); List<Map.Entry<String, Object>> configEntries = new ArrayList<>(); CollectionUtils.addAll(configEntries, configurationTable.entrySet().iterator()); if (metatype == null) { throw loggedException("Could not find metatype for " + pid); } CollectionUtils.transform( configEntries, new CardinalityTransformer(metatype.getAttributeDefinitions(), pid)); Dictionary<String, Object> newConfigProperties = new Hashtable<>(); for (Map.Entry<String, Object> configEntry : configEntries) { String configEntryKey = configEntry.getKey(); Object configEntryValue = <START> sanitizeUIConfiguration(pid, configEntryKey, configEntry.getValue()); <END> if (configEntryValue.equals("password")) { for (Map<String, Object> metatypeProperties : metatype.getAttributeDefinitions()) { if (metatypeProperties.get("id").equals(configEntry.getKey()) && AttributeDefinition.PASSWORD == (Integer) metatypeProperties.get("type")) { Dictionary<String, Object> configProperties = config.getProperties(); if (configProperties != null) { configEntryValue = configProperties.get(configEntryKey); } break; } } } newConfigProperties.put(configEntryKey, configEntryValue); } config.update(newConfigProperties); } }</code><technical_language>toLowerCase() add Locale.getDefault() comparison? answer is a question</technical_language>

Target:
public void updateForLocation( final String pid, String location, Map<String, Object> configurationTable) throws IOException { if (pid == null || pid.length() < 1) { throw loggedException(ILLEGAL_PID_MESSAGE); } if (configurationTable == null) { throw loggedException("Argument configurationTable cannot be null"); } Configuration config = configurationAdmin.getConfiguration(pid, location); if (isPermittedToViewService(config.getPid())) { final Metatype metatype = configurationAdminImpl.findMetatypeForConfig(config); List<Map.Entry<String, Object>> configEntries = new ArrayList<>(); CollectionUtils.addAll(configEntries, configurationTable.entrySet().iterator()); if (metatype == null) { throw loggedException("Could not find metatype for " + pid); } CollectionUtils.transform( configEntries, new CardinalityTransformer(metatype.getAttributeDefinitions(), pid)); Dictionary<String, Object> newConfigProperties = new Hashtable<>(); for (Map.Entry<String, Object> configEntry : configEntries) { String configEntryKey = configEntry.getKey(); Object configEntryValue = sanitizeUIConfiguration(pid, configEntryKey, configEntry.getValue()); if (configEntryValue.equals("password")) { for (Map<String, Object> metatypeProperties : metatype.getAttributeDefinitions()) { if (metatypeProperties.get("id").equals(configEntry.getKey()) && AttributeDefinition.PASSWORD == (Integer) metatypeProperties.get("type")) { Dictionary<String, Object> configProperties = config.getProperties(); if (configProperties != null) { configEntryValue = configProperties.get(configEntryKey); } break; } } } newConfigProperties.put(configEntryKey, configEntryValue); } config.update(newConfigProperties); } }