Browse Source

Correct case of Class-Path attribute

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

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

@@ -80,6 +80,7 @@ import org.apache.tools.ant.util.CollectionUtils;
* greater than 72 bytes being wrapped and continued on the next * greater than 72 bytes being wrapped and continued on the next
* line. If an application can not handle the continuation mechanism, it * line. If an application can not handle the continuation mechanism, it
* is a defect in the application, not this task. * is a defect in the application, not this task.
*
* @author Conor MacNeill * @author Conor MacNeill
* @author Stefan Bodewig * @author Stefan Bodewig
* @author <a href="mailto:j_a_fernandez@yahoo.com">Jose Alberto Fernandez</a> * @author <a href="mailto:j_a_fernandez@yahoo.com">Jose Alberto Fernandez</a>
@@ -102,7 +103,7 @@ public class Manifest {
public static final String ATTRIBUTE_FROM = "From"; public static final String ATTRIBUTE_FROM = "From";


/** The Class-Path Header is special - it can be duplicated */ /** The Class-Path Header is special - it can be duplicated */
public static final String ATTRIBUTE_CLASSPATH = "class-path";
public static final String ATTRIBUTE_CLASSPATH = "Class-Path";


/** Default Manifest version if one is not specified */ /** Default Manifest version if one is not specified */
public static final String DEFAULT_MANIFEST_VERSION = "1.0"; public static final String DEFAULT_MANIFEST_VERSION = "1.0";
@@ -463,7 +464,7 @@ public class Manifest {
while (e.hasMoreElements()) { while (e.hasMoreElements()) {
String attributeName = (String) e.nextElement(); String attributeName = (String) e.nextElement();
Attribute attribute = section.getAttribute(attributeName); Attribute attribute = section.getAttribute(attributeName);
if (attributeName.equals(ATTRIBUTE_CLASSPATH)) {
if (attributeName.equalsIgnoreCase(ATTRIBUTE_CLASSPATH)) {
if (classpathAttribute == null) { if (classpathAttribute == null) {
classpathAttribute = new Attribute(); classpathAttribute = new Attribute();
classpathAttribute.setName(ATTRIBUTE_CLASSPATH); classpathAttribute.setName(ATTRIBUTE_CLASSPATH);
@@ -609,7 +610,7 @@ public class Manifest {
} else { } else {
// classpath attributes go into a vector // classpath attributes go into a vector
String attributeKey = attribute.getKey(); String attributeKey = attribute.getKey();
if (attributeKey.equals(ATTRIBUTE_CLASSPATH)) {
if (attributeKey.equalsIgnoreCase(ATTRIBUTE_CLASSPATH)) {
Attribute classpathAttribute = Attribute classpathAttribute =
(Attribute) attributes.get(attributeKey); (Attribute) attributes.get(attributeKey);




Loading…
Cancel
Save