@Override protected void onProfileProperty(String profileName, String propertyKey, String propertyValue, boolean isSupportedProperty, String line) { // Record that this property key has been declared for this profile if (existingProfileProperties.get(profileName) == null) { existingProfileProperties.put(profileName, new HashSet<String>()); } existingProfileProperties.get(profileName).add(propertyKey); if (deletedProfiles.contains(profileName)) return; // Keep the unsupported properties if ( !isSupportedProperty ) { writeLine(line); return; } // flush all the buffered comments and empty lines before this property line flush(); // Modify the property value if (newProfiles.containsKey(profileName)) { String newValue = newProfiles.get(profileName) .getPropertyValue(propertyKey); if (newValue != null) { writeProperty(propertyKey, newValue); } // else remove that line } else { writeLine(line); } }
@Override protected void onProfileProperty(String profileName, String propertyKey, String propertyValue, boolean isSupportedProperty, String line) { // Record that this property key has been declared for this profile if (existingProfileProperties.get(profileName) == null) { existingProfileProperties.put(profileName, new HashSet<String>()); } existingProfileProperties.get(profileName).add(propertyKey); if (deletedProfiles.contains(profileName)) return; // Keep the unsupported properties if ( !isSupportedProperty ) { writeLine(line); return; } // flush all the buffered comments and empty lines before this property line flush(); // Modify the property value if (newProfiles.containsKey(profileName)) { String newValue = newProfiles.get(profileName) .getPropertyValue(propertyKey); if (newValue != null) { writeProperty(propertyKey, newValue); } // else remove that line } else { writeLine(line); } }
@Override protected void onProfileProperty(String profileName, String propertyKey, String propertyValue, boolean isSupportedProperty, String line) { // Record that this property key has been declared for this profile if (existingProfileProperties.get(profileName) == null) { existingProfileProperties.put(profileName, new HashSet<String>()); } existingProfileProperties.get(profileName).add(propertyKey); if (deletedProfiles.contains(profileName)) return; // Keep the unsupported properties if ( !isSupportedProperty ) { writeLine(line); return; } // flush all the buffered comments and empty lines before this property line flush(); // Modify the property value if (newProfiles.containsKey(profileName)) { String newValue = newProfiles.get(profileName) .getPropertyValue(propertyKey); if (newValue != null) { writeProperty(propertyKey, newValue); } // else remove that line } else { writeLine(line); } }