You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Vidar Ramdal <vi...@idium.no> on 2008/11/12 11:39:49 UTC

Why is JcrNodeResource() not public?

I'd like to use JcrNodeResource and JcrPropertyResource in an extended
JcrResourceProvider, but I run into trouble because JcrNodeResource's
constructor is not public. Its sibling JcrPropertyResource, on the
other hand, *has* a public constructor.

Is there any reason why JcrNodeResource() cannot be public, or can I
go ahead and create a JIRA task + patch?

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway

Re: Why is JcrNodeResource() not public?

Posted by Vidar Ramdal <vi...@idium.no>.
On Wed, Nov 12, 2008 at 11:44 AM, Felix Meschberger <fm...@gmail.com> wrote:
> Hi Vidar,
>
> Vidar Ramdal schrieb:
>> I'd like to use JcrNodeResource and JcrPropertyResource in an extended
>> JcrResourceProvider, but I run into trouble because JcrNodeResource's
>> constructor is not public. Its sibling JcrPropertyResource, on the
>> other hand, *has* a public constructor.
>>
>> Is there any reason why JcrNodeResource() cannot be public, or can I
>> go ahead and create a JIRA task + patch?

> [...]
> Yes, filing a JIRA with patch would be ok.

The patch at SLING-729 is ready for review/commit.

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway

Re: Why is JcrNodeResource() not public?

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Vidar,

Vidar Ramdal schrieb:
> I'd like to use JcrNodeResource and JcrPropertyResource in an extended
> JcrResourceProvider, but I run into trouble because JcrNodeResource's
> constructor is not public. Its sibling JcrPropertyResource, on the
> other hand, *has* a public constructor.
> 
> Is there any reason why JcrNodeResource() cannot be public, or can I
> go ahead and create a JIRA task + patch?

We can probably make the JcrNodeResource constructor public, too, or
make the JcrPropertyResource constructor non-public. Important is, that
the containing package is not exported from the module, since this is
implementation detail of the jcr/resource package.

So, for your use-case it is probably ok to make the constructor public
and go with this.

Yes, filing a JIRA with patch would be ok.

Regards
Felix