Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E89E7765 for ; Thu, 14 Jul 2011 09:19:40 +0000 (UTC) Received: (qmail 71390 invoked by uid 500); 14 Jul 2011 09:19:40 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 70424 invoked by uid 500); 14 Jul 2011 09:19:36 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 70366 invoked by uid 99); 14 Jul 2011 09:19:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jul 2011 09:19:23 +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; Thu, 14 Jul 2011 09:19:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E9F2E578EF for ; Thu, 14 Jul 2011 09:18:59 +0000 (UTC) Date: Thu, 14 Jul 2011 09:18:59 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <964520038.12820.1310635139955.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <238904386.12802.1310634420171.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-5331) Incorrect use of CharsetEncoder in DDMWriter 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/DERBY-5331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-5331: -------------------------------------- Attachment: reset-flush.diff Attached a patch that adds a call to reset() before encode(), and also a call to flush() if the encode() operation successfully encoded all characters in the input. Running regression tests now. > Incorrect use of CharsetEncoder in DDMWriter > -------------------------------------------- > > Key: DERBY-5331 > URL: https://issues.apache.org/jira/browse/DERBY-5331 > Project: Derby > Issue Type: Bug > Components: Network Server > Affects Versions: 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2 > Reporter: Knut Anders Hatlen > Attachments: reset-flush.diff > > > DDMWriter has two calls to CharsetEncoder.encode(), in writeLDString() and writeString(). According to the javadoc for CharsetEncoder, one should call reset() before one calls encode(), and flush() after on. DDMWriter doesn't call reset() or flush(). I'm not aware of any problems that happen because of it, but we should follow the spec to avoid surprises. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira