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

Francesco Mari commented on OAK-2962:
-------------------------------------

[~amitjain],

bq. Is it possible to add a test specifically for testing out on 
SegmentNodeStoreService to demonstrate the problem there.

In the current form, it is not possible to test the {{SegmentNodeStoreService}} 
to directly demonstrate the problem. It would be easier if there would be 
package-scoped getters to expose the configuration values as seen by the 
component during its lifecycle. Anyway, since the change in the patch is really 
trivial, I don't think that going through this small refactoring is really 
worth it. This may be the scope of another issue, if really needed.

bq. Could you please check DocumentNodeStoreService also? It also needs to 
change similarly.

Sure, I can. Is there already an issue for it?

> SegmentNodeStoreService fails to handle empty strings in the OSGi 
> configuration
> -------------------------------------------------------------------------------
>
>                 Key: OAK-2962
>                 URL: https://issues.apache.org/jira/browse/OAK-2962
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>             Fix For: 1.3.2
>
>         Attachments: OAK-2962-01.patch, OAK-2962-02.patch
>
>
> When an OSGi configuration property is removed from the dictionary associated 
> to a component, the default value assigned to it is an empty string.
> When such an empty string is processed by {{SegmentNodeStoreService#lookup}}, 
> it is returned to its caller as a valid configuration value. The callers of 
> {{SegmentNodeStoreService#lookup}}, instead, expect {{null}} when such an 
> empty value is found.
> The method {{SegmentNodeStoreService#lookup}} should check for empty strings 
> in the OSGi configuration, and treat them as {{null}} values.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to