[ 
https://issues.apache.org/jira/browse/OAK-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Dürig updated OAK-1431:
-------------------------------

    Comment: was deleted

(was: I currently see two ways to convey the information about the source of 
the copy operation down to the {{VersionEditor}}:

# instead of using a hidden property, use a non hidden property and a special 
mixin type for that property. There is no need to actually persist this. This 
is only for passing that information down and the {{VersionEditor}} could 
easily remove the mixin and the property again. 
# use the {{CommitInfo}} to pass additional copy meta data down to the 
{{VersionEditor}}. 

Any other options?
)

> Handling of empty or invalid names
> ----------------------------------
>
>                 Key: OAK-1431
>                 URL: https://issues.apache.org/jira/browse/OAK-1431
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jukka Zitting
>
> The {{NodeState.getChildNode()}} says the following about the name argument:
> bq. The name is an opaque string and is not parsed or otherwise interpreted 
> by this method.
> This causes some confusion higher up the stack, for example the following 
> code produces an unexpected result:
> {code}
> Root root = ...;
> Tree a = root.getTree("/");
> Tree b = root.getTree("/").getChild("");
> assert a.exists() && !b.exists() && a.getPath().equals(b.getPath()); // !
> {code}
> To avoid such confusion, I'd outlaw such potentially troublesome cases like 
> empty names or names containing a forward slash all the way down at the 
> NodeState level. The {{getChildNode()}} method could say something like this:
> bq. Names that are empty or ones contain a forward slash are considered 
> invalid and cause an {{IllegalArgumentException}} to be thrown.
> Code higher up the stack should probably be adjusted to better handle such 
> edge cases.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to