commit | 990bafc95969abef7d7593cb8a0f2ac0a8c88a27 | [log] [tgz] |
---|---|---|
author | Karl Pauls <pauls@apache.org> | Fri Sep 09 18:18:57 2011 +0000 |
committer | Karl Pauls <pauls@apache.org> | Fri Sep 09 18:18:57 2011 +0000 |
tree | 85ea7c3d85689c02b4c5f24550e025832f632cf4 | |
parent | c1321f9fce09c2e3b42662ef1b5b73da8edf515f [diff] |
Make the parsing more lenient. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1167322 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java index 26d1ddd..1c66e33 100644 --- a/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java +++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
@@ -1537,7 +1537,6 @@ public static void main(String[] headers) { String header = headers[0]; - if (header != null) { if (header.length() == 0) @@ -1662,10 +1661,25 @@ { 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;