You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Nikita Ryanov (Jira)" <ji...@apache.org> on 2021/01/17 15:14:00 UTC

[jira] [Created] (CURATOR-586) NamespaceFacade return null if namespace is empty

Nikita Ryanov created CURATOR-586:
-------------------------------------

             Summary: 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


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)