Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E91E11C77 for ; Wed, 16 Jul 2014 15:37:12 +0000 (UTC) Received: (qmail 66355 invoked by uid 500); 16 Jul 2014 15:37:10 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 66261 invoked by uid 500); 16 Jul 2014 15:37:09 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 66178 invoked by uid 99); 16 Jul 2014 15:37:09 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2014 15:37:09 +0000 Date: Wed, 16 Jul 2014 15:37:09 +0000 (UTC) From: "Benedikt Ritter (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DBUTILS-118) BeanProcessor not returning nanoseconds MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DBUTILS-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14063622#comment-14063622 ] Benedikt Ritter commented on DBUTILS-118: ----------------------------------------- [~feysal] I'm currently working on the open issues and expect to cut Dbutil 1.6 RC1 anytime this week. > BeanProcessor not returning nanoseconds > --------------------------------------- > > Key: DBUTILS-118 > URL: https://issues.apache.org/jira/browse/DBUTILS-118 > Project: Commons DbUtils > Issue Type: Bug > Affects Versions: 1.5 > Reporter: Feysal Rujbally > Priority: Blocker > Fix For: 1.6 > > Attachments: vcs-diff8964305076305734485.patch > > > We are calling an SP to retrieve a timestamp from the DB but the mapping of the nano seconds is not being done correctly. Only milliseconds are being returned although the SP is returning the nano seconds. > After debugging through the apache db utils, we found that in the class BeanProcessor (method callSetter), the setting of timestamp is not being done properly: > {code:java} > if ("java.sql.Timestamp".equals(targetType)) { > value = new java.sql.Timestamp(((java.util.Date) value).getTime()); > } > {code} > We have modified the codes as follows so as to get the nano seconds: > {code:java} > if ("java.sql.Timestamp".equals(targetType)) > { > int nanos = ((Timestamp) value).getNanos(); > value = new java.sql.Timestamp(((Timestamp) value).getTime()); > ((Timestamp) value).setNanos(nanos); > } > {code} > Can you please provide a fix as soon as possible. (v1.6 would be great) -- This message was sent by Atlassian JIRA (v6.2#6252)