Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2009-03-06 18:45:57 -0500
committerThomas Watson2009-03-06 18:45:57 -0500
commit3cd3c97b7faa96c0d3d15703a38271e956c1226f (patch)
treecdb6aa09edf964cbc7fdf45953a69debdba2ea68 /bundles/org.eclipse.osgi/resolver
parente379c4af18127b1e1f5ad68815e47939f515a767 (diff)
downloadrt.equinox.framework-3cd3c97b7faa96c0d3d15703a38271e956c1226f.tar.gz
rt.equinox.framework-3cd3c97b7faa96c0d3d15703a38271e956c1226f.tar.xz
rt.equinox.framework-3cd3c97b7faa96c0d3d15703a38271e956c1226f.zip
Bug 267455 Update package resolver to use new PackagePermission from RFC 131v20090306-1900
Diffstat (limited to 'bundles/org.eclipse.osgi/resolver')
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java
index 7fc6632de..0c9033ffa 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/PermissionChecker.java
@@ -39,9 +39,9 @@ public class PermissionChecker {
int errorType = 0;
if (vc instanceof ImportPackageSpecification) {
errorType = ResolverError.IMPORT_PACKAGE_PERMISSION;
- producerPermission = new PackagePermission(bd.getName(), PackagePermission.EXPORT);
- consumerPermission = new PackagePermission(vc.getName(), PackagePermission.IMPORT);
producer = context.getBundle(((ExportPackageDescription) bd).getExporter().getBundleId());
+ producerPermission = new PackagePermission(bd.getName(), PackagePermission.EXPORTONLY);
+ consumerPermission = new PackagePermission(vc.getName(), producer, PackagePermission.IMPORT);
} else {
boolean requireBundle = vc instanceof BundleSpecification;
errorType = requireBundle ? ResolverError.REQUIRE_BUNDLE_PERMISSION : ResolverError.FRAGMENT_BUNDLE_PERMISSION;
@@ -78,6 +78,6 @@ public class PermissionChecker {
if (!checkPermissions)
return true;
Bundle bundle = context.getBundle(export.getExporter().getBundleId());
- return bundle == null ? false : bundle.hasPermission(new PackagePermission(export.getName(), PackagePermission.EXPORT));
+ return bundle == null ? false : bundle.hasPermission(new PackagePermission(export.getName(), PackagePermission.EXPORTONLY));
}
}

Back to the top