Bundle.getResource does not check for AdminPermission, like getResources does. ------------------------------------------------------------------------------
Key: FELIX-150 URL: http://issues.apache.org/jira/browse/FELIX-150 Project: Felix Issue Type: Bug Components: Framework Reporter: Olivier Gruber Priority: Minor Both getResource and getResources on Bundle should return null if the caller does not have the appropriate AdminPermission[this,RESOURCE] This is tested in getResources, which is not implemented otherwise, but left unchecked in getResource(). Missing code (copied from BundleImpl.getResources()): Object sm = System.getSecurityManager(); if (sm != null) { try { ((SecurityManager) sm).checkPermission(new AdminPermission(this, AdminPermission.RESOURCE)); } catch (Exception e) { return null; // No permission } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira