commit | 332a68284e5a96613f15d6f963f7d34c08a4a96c | [log] [tgz] |
---|---|---|
author | Richard S. Hall <rickhall@apache.org> | Thu Jul 12 14:26:44 2007 +0000 |
committer | Richard S. Hall <rickhall@apache.org> | Thu Jul 12 14:26:44 2007 +0000 |
tree | d3d4262a0235a8ec88f525b31f5c13df9b3934af | |
parent | 046805075bc12c6029f24b1627c4e962890ec9e2 [diff] |
Fixed another version matching-related issue that was uncovered due to the last fix. The parser was not assigning a default version to exported packages that did not specify a version, thus attempts to match 0.0.0 would fail. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@555642 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 cdad237..e3edd0e 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
@@ -766,6 +766,13 @@ } } + // Always add the default version if not specified. + if ((v == null) && (sv == null)) + { + v = new R4Attribute( + Constants.VERSION_ATTRIBUTE, Version.emptyVersion, false); + } + // Ensure that only the "version" attribute is used and convert // it to the appropriate type. if ((v != null) || (sv != null))