diff options
Diffstat (limited to 'bundles/org.eclipse.osgi')
2 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EvaluationCacheKey.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EvaluationCacheKey.java index d0db72521..f59472545 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EvaluationCacheKey.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EvaluationCacheKey.java @@ -17,11 +17,11 @@ class EvaluationCacheKey { private final Permission permission; - private final Long bundleId; + private final BundlePermissions bundlePermissions; EvaluationCacheKey(BundlePermissions bundlePermissions, Permission permission) { this.permission = permission; - this.bundleId = bundlePermissions.getBundle().getBundleId(); + this.bundlePermissions = bundlePermissions; } @Override @@ -33,11 +33,11 @@ class EvaluationCacheKey { return false; } EvaluationCacheKey that = (EvaluationCacheKey) o; - return Objects.equals(bundleId, that.bundleId) && Objects.equals(permission, that.permission); + return bundlePermissions == that.bundlePermissions && Objects.equals(permission, that.permission); } @Override public int hashCode() { - return Objects.hash(bundleId, permission); + return Objects.hash(bundlePermissions, permission); } } diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java index 6a93c53d2..a084b889b 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java @@ -111,7 +111,7 @@ public class SecurityTable extends PermissionCollection { Condition[] conditions = row.getConditions(bundlePermissions); if (conditions != null) { for (Condition condition : conditions) { - if (condition.isMutable()) { + if (condition != null && condition.isMutable()) { evaluationCache.put(evaluationCacheKey, MUTABLE); return true; } |