Browse Source

Handle continuations in section names

PR:	4075


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

+ 11
- 2
src/main/org/apache/tools/ant/taskdefs/Manifest.java View File

@@ -275,9 +275,18 @@ public class Manifest {
if (line.charAt(0) == ' ') {
// continuation line
if (attribute == null) {
throw new ManifestException("Can't start an attribute with a continuation line " + line);
if (name != null) {
// a continuation on the first line is a continuation of the name - concatenate
// this line and the name
name += line.substring(1);
}
else {
throw new ManifestException("Can't start an attribute with a continuation line " + line);
}
}
else {
attribute.addContinuation(line);
}
attribute.addContinuation(line);
}
else {
attribute = new Attribute(line);


Loading…
Cancel
Save