[ 
https://issues.apache.org/jira/browse/FELIX-6697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838210#comment-17838210
 ] 

Tom Watson commented on FELIX-6697:
-----------------------------------

{quote}Does it mean that a version 7 implementation should actually not allow 
the described behaviour, but a version 8 should?
{quote}
I'll leave that to others that work on the Felix Framework to decide.

As an Equinox Framework maintainer I would not do that though.  This 
clarification in R8 was to align it with the behavior that the two 
implementation developers of both Equinox and Felix agreed to long ago but it 
was never codified in the specification until R8.

As I recall, this behavior was necessary to the implementations of remote 
services and certain TCK tests of remote services would fail if the frameworks 
did not behave this way to allow for reflective scenarios.

> ServiceReference.isAssignableTo() allows any bundle to get access to 
> unexported services from any other bundle
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-6697
>                 URL: https://issues.apache.org/jira/browse/FELIX-6697
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-3.0.0, framework-4.0.0, framework-5.0.0, 
> framework-6.0.0, framework-7.0.5
>            Reporter: Radu Cotescu
>            Priority: Critical
>
> I was investigating some code that does a call similar to:
> {noformat}
> bundleContext.getService(bundleContext.getServiceReference("anyClassYouWant"));{noformat}
> where {{anyClassYouWant}} is indeed a service provided by a different bundle 
> than the caller, but not exported. Therefore, there is no wire in between the 
> two. The requester seems to get the service without any issue. This seems to 
> boil down to this [0] commit, where the thrown exception gets ignored.
>  
> [0]  - 
> [https://github.com/apache/felix-dev/commit/fd69ad6b9fd510588d858e4e06a31dee1fb59199]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to