Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 47600 invoked from network); 11 Mar 2011 04:17:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Mar 2011 04:17:23 -0000 Received: (qmail 76188 invoked by uid 500); 11 Mar 2011 04:17:22 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 76180 invoked by uid 99); 11 Mar 2011 04:17:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Mar 2011 04:17:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Mar 2011 04:17:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5FE563A356D for ; Fri, 11 Mar 2011 04:16:59 +0000 (UTC) Date: Fri, 11 Mar 2011 04:16:59 +0000 (UTC) From: "Matthew T. Adams (JIRA)" To: jdo-dev@db.apache.org Message-ID: <1459107519.12603.1299817019374.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Created: (JDO-679) Clarify downcasts in queries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Clarify downcasts in queries ---------------------------- Key: JDO-679 URL: https://issues.apache.org/jira/browse/JDO-679 Project: JDO Issue Type: Improvement Components: specification Affects Versions: JDO 3 maintenance release 1 Reporter: Matthew T. Adams The specification needs clarification when it comes to downcasting within the query filter. Currently, the JDO 3.0 specification states (14.6.2): "Navigation through a null-valued field, which would throw NullPointerException, is treated as if the subexpression returned false. Similarly, a failed cast operation, which would throw ClassCastException, is treated as if the subexpression returned false. Other subexpressions or other values for variables might still qualify the candidate instance for inclusion in the result set." The clarification is that if a cast will never be successful (casting Employee as Integer, for example), then an exception should be thrown (JDOUserException with an inner ClassCastException?), otherwise, the cast behaves as the specification dictates. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira