[
https://issues.apache.org/jira/browse/CURATOR-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17268255#comment-17268255
]
Nikita Ryanov commented on CURATOR-586:
---------------------------------------
[~cammckenzie] thank you for your response.
Yes, the issue only in cases when getNamespace was called explicitly and the
result was expected to be a not null value according to javadoc.
I'm not sure that this fix is also correct, maybe it even better to just
mention it in doc, but i absolutely agree that this is probably a seldom use
case and it can be kept as is
> NamespaceFacade return null if namespace is empty
> -------------------------------------------------
>
> Key: CURATOR-586
> URL: https://issues.apache.org/jira/browse/CURATOR-586
> Project: Apache Curator
> Issue Type: Bug
> Components: Framework
> Reporter: Nikita Ryanov
> Priority: Trivial
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> According to java doc framework should return empty string if namespace is
> empty instead of null:
>
> {code:java}
> /**
> * Return the current namespace or "" if none
> *
> * @return namespace
> */
> public String getNamespace();
> {code}
>
> If namespace is claimed from CuratorFramework client directly all is ok, but
> if NamespaceFacade is used then null is returned.
> How to reproduce:
> {code:java}
> RetryPolicy policy = ...;
> CuratorFramework client =
> CuratorFrameworkFactory.newClient("connectionString", policy);
> CuratorFramework clientWithNamespaceFacade = client.usingNamespace(null);
> clientWithNamespaceFacade.getNamespace(); // <- expected "", but got null
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)