This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new 6aef60e [FELIX-6397] Allow java.* packages export in ResourceBuilder
(as it's required since R7)
6aef60e is described below
commit 6aef60e30f4a260923fb7b7bfe486f433cd9c43b
Author: jbonofre <[email protected]>
AuthorDate: Fri Mar 26 09:19:16 2021 +0100
[FELIX-6397] Allow java.* packages export in ResourceBuilder (as it's
required since R7)
---
.../main/java/org/apache/felix/utils/resource/ResourceBuilder.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
a/utils/src/main/java/org/apache/felix/utils/resource/ResourceBuilder.java
b/utils/src/main/java/org/apache/felix/utils/resource/ResourceBuilder.java
index a269300..fe04c07 100644
--- a/utils/src/main/java/org/apache/felix/utils/resource/ResourceBuilder.java
+++ b/utils/src/main/java/org/apache/felix/utils/resource/ResourceBuilder.java
@@ -701,15 +701,12 @@ public final class ResourceBuilder {
for (ParsedHeaderClause clause : clauses) {
// Verify that the named package has not already been declared.
for (String pkgName : clause.paths) {
- // Verify that java.* packages are not exported.
- if (pkgName.startsWith("java.")) {
- throw new BundleException("Exporting java.* packages not
allowed: " + pkgName);
// The character "." has no meaning in the OSGi spec except
// when placed on the bundle class path. Some people, however,
// mistakenly think it means the default package when imported
// or exported. This is not correct. It is invalid.
- } else if (pkgName.equals(".")) {
- throw new BundleException("Exporing '.' is invalid.");
+ if (pkgName.equals(".")) {
+ throw new BundleException("Exporting '.' is invalid.");
// Make sure a package name was specified.
} else if (pkgName.length() == 0) {
throw new BundleException("Exported package names cannot
be zero length.");