You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Deparvu (JIRA)" <ji...@apache.org> on 2017/11/27 09:56:00 UTC
[jira] [Commented] (OAK-6979)
CugConfiguration.unbindMountInfoProvider doesn't restore the default
[ https://issues.apache.org/jira/browse/OAK-6979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16266593#comment-16266593 ]
Alex Deparvu commented on OAK-6979:
-----------------------------------
Angela, I don't think I agree with this reasoning.
The way I see it there are 2 usage scenarios:
* non OSGi where the mountInfoProvider is init to the default and bin/unbind should never be called.
* OSGi where the mountInfoProvider is a reference and there is no activation of the service without a bind call. In this case unbind really means deactivation so any usage of this service post-deactivation is not legal.
What is the usecase you are looking at?
> CugConfiguration.unbindMountInfoProvider doesn't restore the default
> --------------------------------------------------------------------
>
> Key: OAK-6979
> URL: https://issues.apache.org/jira/browse/OAK-6979
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: authorization-cug
> Reporter: angela
> Assignee: angela
> Attachments: OAK-6979.patch
>
>
> [~stillalex], looking at the {{CugConfiguration}} again I spotted that {{unbindMountInfoProvider}} sets the {{mountInfoProvider}} field to {{null}}, while it initially gets set to a default as follows:
> {code}
> @Reference
> private MountInfoProvider mountInfoProvider = Mounts.defaultMountInfoProvider();
> {code}
> shouldn't unbinding restore the default and by thus make sure it's not {{null}}? if i am missing something feel free to resolved as not a problem... otherwise i would fix it and write a dedicated unit test for the bind/unbind.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)