2015-12-07 18:09 GMT+01:00 Michael Dürig <[email protected]>:

>
>
> On 7.12.15 5:01 , Francesco Mari wrote:
>
>>   * org.apache.jackrabbit.oak.plugins.value.ValueImpl [0] : this looks
>>> like
>>> >something we can fix easily, just fix the Segment Property State impl to
>>> >catch potential SNFEs instead of the generic ValueImpl
>>> >
>>> >
>>>
>> This is OAK-3740. I don't know if this approach works.
>> PropertyState#getValue() doesn't declare checked exception, and
>> RepositoryException is a checked exception. What about documenting in
>> PropertyState#getValue() that implementers can throw an
>> IllegalStateException to signal inconsistencies in the underlying code? In
>> this case, ValueImpl could be implemented to always wrap
>> IllegalStateExceptions in a RepositoryException. Moreover,
>> SegemntNotFoundException already is a subclass of IllegalStateException.
>>
>>
> IMO SNFE should be exported so upstream projects can depend on it.
> Otherwise there is no value in throwing a specific exception in the first
> place.
>
>
My goal is to move the Segment Store into its own bundle without having
circular dependencies between this new bundle and oak-core. I could have
tried to create two bundles - one with the exported API of the Segment
Store and one with its implementation - but I prefer not to go this way at
the moment. Defining a proper Segment Store API seems to require a
refactoring way deeper than the one I'm doing, and I'm not sure if we want
to go head first into this task, given the current changes currently in
progress on the Segment Store.


> Michael
>
> PS: the revenge of checked exceptions ;-)

Reply via email to