Browse Source

Correct equality check in Manifest.Section class

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270811 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 23 years ago
parent
commit
43e8c0e742
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      src/main/org/apache/tools/ant/taskdefs/Manifest.java

+ 5
- 4
src/main/org/apache/tools/ant/taskdefs/Manifest.java View File

@@ -494,10 +494,11 @@ public class Manifest extends Task {
return false;
}

for (Enumeration e = attributes.elements(); e.hasMoreElements();) {
Attribute attribute = (Attribute)e.nextElement();
Attribute rshAttribute = (Attribute)rhsSection.attributes.get(attribute.getName().toLowerCase());
if (!attribute.equals(rshAttribute)) {
for (Enumeration e = attributes.keys(); e.hasMoreElements();) {
String attributeName = (String)e.nextElement();
Object attributeValue = attributes.get(attributeName);
Object rshAttributeValue = rhsSection.attributes.get(attributeName);
if (!attributeValue.equals(rshAttributeValue)) {
return false;
}
}


Loading…
Cancel
Save