Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 36960 invoked from network); 24 Nov 2006 08:11:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2006 08:11:26 -0000 Received: (qmail 32358 invoked by uid 500); 24 Nov 2006 08:11:34 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 32186 invoked by uid 500); 24 Nov 2006 08:11:34 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 32176 invoked by uid 99); 24 Nov 2006 08:11:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 00:11:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 00:11:23 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6539671429F for ; Fri, 24 Nov 2006 00:11:03 -0800 (PST) Message-ID: <26407511.1164355863412.JavaMail.jira@brutus> Date: Fri, 24 Nov 2006 00:11:03 -0800 (PST) From: "David Nuescheler (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-644) Node.isNodeType() throws if namespace is not defined. In-Reply-To: <6812970.1164296704707.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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