Hi all, Am Montag, den 18.02.2008, 17:45 +0100 schrieb Bertrand Delacretaz: > Hi, > > Currently Sling uses the String "default" for the default workspace > name, in several places. > > According to [1] however, "if workspaceName is null, a default > workspace is automatically selected by the repository implementation". > > This might make Sling more interoperable with various JCR > repositories, where the default workspace is not necessarily named > "default". > > My suggestion: > > 1) Use null for the workspace name in Repository.login() calls, if the > configured workspace name is an empty string.
I would take a slightly different approach: If the configuration value is an empty string, assume the default workspace to be "null". Such that SlingRepository.getDefaultWorkspace() returns the actual name - null that is - if none is configured. We would also have to quickly verify any uses (in Sling) of the getDefaultWorkspace() method for potential NPE. > > 2) Set the default workspace name to that empty string > > 3) Change the "workspace" configuration variable description to > indicate that an empty string means "use default workspace supplied by > the JCR Repository". > > WDYT? Though I am generally a fan of defined default values, I agree, that there are benefits of using "whatever is the default provided by the system". So I agree with this approach. Regards Felix
