Return-Path: X-Original-To: apmail-felix-commits-archive@www.apache.org Delivered-To: apmail-felix-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E249285A5 for ; Fri, 9 Sep 2011 18:19:19 +0000 (UTC) Received: (qmail 1224 invoked by uid 500); 9 Sep 2011 18:19:19 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 1130 invoked by uid 500); 9 Sep 2011 18:19:19 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 1123 invoked by uid 99); 9 Sep 2011 18:19:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 18:19:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 18:19:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E57502388AB8 for ; Fri, 9 Sep 2011 18:18:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1167322 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java Date: Fri, 09 Sep 2011 18:18:57 -0000 To: commits@felix.apache.org From: pauls@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110909181857.E57502388AB8@eris.apache.org> Author: pauls Date: Fri Sep 9 18:18:57 2011 New Revision: 1167322 URL: http://svn.apache.org/viewvc?rev=1167322&view=rev Log: Make the parsing more lenient. Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java?rev=1167322&r1=1167321&r2=1167322&view=diff ============================================================================== --- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java (original) +++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java Fri Sep 9 18:18:57 2011 @@ -1537,7 +1537,6 @@ public class ManifestParser public static void main(String[] headers) { String header = headers[0]; - if (header != null) { if (header.length() == 0) @@ -1662,10 +1661,25 @@ public class ManifestParser { quoted = false; } - state = VALUE; + if (!Character.isWhitespace(currentChar)) { + state = VALUE; + } + else { + currentPosition++; + } break; case VALUE: - escaped = currentChar == '\\'; + if (currentChar == '\\' ) + { + if (escaped) + { + escaped = false; + } + else + { + escaped = true; + } + } if (quoted && !escaped && currentChar == '\"') { quoted = false;