From d1d47e9813e74c308be031e92d2b0b4f479e9c28 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Thu, 11 Oct 2001 14:55:07 +0000 Subject: [PATCH] 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 --- .../org/apache/tools/ant/taskdefs/Manifest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Manifest.java b/src/main/org/apache/tools/ant/taskdefs/Manifest.java index 2c62575f5..bc5bd8e14 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Manifest.java +++ b/src/main/org/apache/tools/ant/taskdefs/Manifest.java @@ -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);