You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "David Nuescheler (JIRA)" <ji...@apache.org> on 2006/11/24 09:11:03 UTC
[jira] Commented: (JCR-644) Node.isNodeType() throws if namespace
is not defined.
[ http://issues.apache.org/jira/browse/JCR-644?page=comments#action_12452387 ]
David Nuescheler commented on JCR-644:
--------------------------------------
I think that the would initially setup his namespaces to be mapped on a session basis to whatever makes sense for the application and then use literals throughout the application. basically i think that a client that does not map its namespaces on a per session basis is broken.
>From my perspective I would assume that once the namespaces are mapped, I would like to work in my application code
using "static/hardwired"-prefixes only. I think that this makes the code much more readable.
With respect to the isNodeType() I would then expect it to fail without an exeception specific to the unknown prefix
much like a query operation that uses an unregistered nodetype or any other read operation for that matter.
I guess from an application perspective I would even assume a getItem("/unknownprefix:bar") to throw a PathNotFoundException.
I believe if the more explicit namespace exception was the intended by the spec, getItem() for example would explicitely throw
a NamespaceException (or similar).
> Node.isNodeType() throws if namespace is not defined.
> -----------------------------------------------------
>
> Key: JCR-644
> URL: http://issues.apache.org/jira/browse/JCR-644
> Project: Jackrabbit
> Issue Type: Bug
> Components: nodetype
> Affects Versions: 1.0, 1.0.1, 1.1, 0.9
> Reporter: Tobias Bocanegra
> Assigned To: Tobias Bocanegra
>
> eg: node.isNodeType("foo:MyNodeType")
> throws an exception if 'foo' is not defined. this is incorrect since an application should not need to check if the namespace exists before checking for a nodetype. it should return false.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira