From graffito-dev-return-691-apmail-incubator-graffito-dev-archive=www.apache.org@incubator.apache.org Sat Nov 12 20:58:43 2005 Return-Path: Delivered-To: apmail-incubator-graffito-dev-archive@www.apache.org Received: (qmail 7649 invoked from network); 12 Nov 2005 20:58:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Nov 2005 20:58:43 -0000 Received: (qmail 62153 invoked by uid 500); 12 Nov 2005 20:58:43 -0000 Mailing-List: contact graffito-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: graffito-dev@incubator.apache.org Delivered-To: mailing list graffito-dev@incubator.apache.org Received: (qmail 62141 invoked by uid 99); 12 Nov 2005 20:58:43 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Nov 2005 12:58:43 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 10D1CC9 for ; Sat, 12 Nov 2005 21:58:22 +0100 (CET) Message-ID: <106298691.1131829102046.JavaMail.jira@ajax.apache.org> Date: Sat, 12 Nov 2005 21:58:22 +0100 (CET) From: "Christophe Lombart (JIRA)" To: graffito-dev@incubator.apache.org Subject: [jira] Assigned: (GRFT-72) Bug in org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.UtilDateTypeConverterImpl In-Reply-To: <1660353369.1131568383706.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/GRFT-72?page=all ] Christophe Lombart reassigned GRFT-72: -------------------------------------- Assign To: Christophe Lombart > Bug in org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.UtilDateTypeConverterImpl > ----------------------------------------------------------------------------------------------------- > > Key: GRFT-72 > URL: http://issues.apache.org/jira/browse/GRFT-72 > Project: Graffito > Type: Bug > Components: JCR-Mapping > Reporter: Martin Koci > Assignee: Christophe Lombart > Attachments: UtilDateTypeConverterImpl.patch > > In this converter following line is used: > return this.getValueFactory().createValue(((java.util.Date) propValue).getTime()); > but propValue must be converted to java.util.Calendar, not into long! ValueFactory than converts to LongValue not DateValue as expected. > Following code works OK: > final long timeInMilis = ((java.util.Date) propValue).getTime(); > final Calendar calendar = Calendar.getInstance(); > calendar.setTimeInMillis(timeInMilis); > return this.getValueFactory().createValue( calendar ); > but I dont know better Date-> Calendar conversion. -- 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