Set keys = new HashSet();
Attributes existingMap = existingManifest.getMainAttributes();
Attributes newMap = manifest.getMainAttributes();
keys.addAll(existingMap.keySet());
keys.addAll(newMap.keySet());
Iterator iterator = keys.iterator();
while (iterator.hasNext()) {
Attributes.Name key = (Attributes.Name) iterator.next();
String newValue = (String) newMap.get(key);
String existingValue = (String) existingMap.get(key);