Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 59025 invoked from network); 14 Sep 2009 20:03:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Sep 2009 20:03:20 -0000 Received: (qmail 83000 invoked by uid 500); 14 Sep 2009 20:03:20 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 82931 invoked by uid 500); 14 Sep 2009 20:03:20 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 82921 invoked by uid 99); 14 Sep 2009 20:03:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 20:03:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Sep 2009 20:03:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 87B58234C4B5 for ; Mon, 14 Sep 2009 13:02:58 -0700 (PDT) Message-ID: <1296519917.1252958578553.JavaMail.jira@brutus> Date: Mon, 14 Sep 2009 13:02:58 -0700 (PDT) From: "Donald Woods (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Assigned: (OPENJPA-1158) Incorrect handling of long values in AbstractResult In-Reply-To: <1295961780.1246652327176.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Donald Woods reassigned OPENJPA-1158: ------------------------------------- Assignee: Donald Woods (was: Craig Russell) > Incorrect handling of long values in AbstractResult > --------------------------------------------------- > > Key: OPENJPA-1158 > URL: https://issues.apache.org/jira/browse/OPENJPA-1158 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 2.0.0 > Reporter: Craig Russell > Assignee: Donald Woods > Priority: Minor > Attachments: OPENJPA-1158.patch > > > This code is in org.apache.openjpa.jdbc.sql.AbstractResult. > public long getLong(Object obj) > throws SQLException { > return getLongInternal(translate(obj, null), null); > } > public long getLong(Column col, Joins joins) > throws SQLException { > return getLongInternal(translate(col, joins), joins); > } > protected long getLongInternal(Object obj, Joins joins) > throws SQLException { > Number val = (Number) checkNull(getObjectInternal(obj, > JavaTypes.INT, null, joins)); > return (val == null) ? 0 : val.intValue(); > } > It seems like it's an obvious bug; using intValue and JavaTypes.INT in getLongInternal should use longValue and JavaTypes.LONG. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.