Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 22035 invoked from network); 7 Mar 2007 02:51:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2007 02:51:58 -0000 Received: (qmail 95096 invoked by uid 500); 7 Mar 2007 02:52:00 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 95056 invoked by uid 500); 7 Mar 2007 02:52:00 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 95047 invoked by uid 99); 7 Mar 2007 02:52:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 18:52:00 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of zhanghuangzhu@gmail.com designates 209.85.134.184 as permitted sender) Received: from [209.85.134.184] (HELO mu-out-0910.google.com) (209.85.134.184) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 18:51:49 -0800 Received: by mu-out-0910.google.com with SMTP id w1so20580mue for ; Tue, 06 Mar 2007 18:51:27 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=Wy/z3AemtUkpJw7O622gnzHjfUKtBVbZnCt6edqeFy0u4YREBtVOssLMfxMwsq809xSdjAoFb2E3dDH5vxtzGNLyF0GNzyk3pZJSU/qnqVgnKL6c6O+IwlF6o6Q2YlJ9eoRxhIhaaF/8tO2RhlImpPIejzYTtzYkqOnwOjs0ey0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=HhLXuBI2i98oLbPe/IZ7LZ9mRHO3DZb0uTtUiIulqbNwkjXTY3sb5HDGwXIMP0AGLMFaH2L3TPG0VKsk5Hmt/0rJ+CsEzndDX2Sykx4AlN0XHQD8plol5H03hGd1Jci3jNtOdiW2l9tKQX+VQ++sDrtaqGmzo1EfjHkW5TEJCtU= Received: by 10.82.163.13 with SMTP id l13mr8424607bue.1173235887379; Tue, 06 Mar 2007 18:51:27 -0800 (PST) Received: by 10.82.115.8 with HTTP; Tue, 6 Mar 2007 18:51:27 -0800 (PST) Message-ID: <4d0b24970703061851p35aad630lc1ffaa9dc721817c@mail.gmail.com> Date: Wed, 7 Mar 2007 10:51:27 +0800 From: "Andrew Zhang" To: dev@harmony.apache.org Subject: [classlib][sql] Non-bug difference of SerialClob.setString(long, String)? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_87723_6290431.1173235887356" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_87723_6290431.1173235887356 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi guys, As spec says, SerialClob.setString(long, String) throws SerialException - if there is an error accessing the CLOB value; if an invalid position is set; if an invalid offset value is set; if number of bytes to be written is greater than the SerialClob length; or the combined values of the length and offset is greater than the Clob buffer. But following code throws ArrayIndexOutOfBoundException instead. public void test() { String s = "hello"; char[] buf = s.toCharArray(); SerialClob serialClob = new SerialClob(buf); try { serialClob.setString(2, "hello"); fail("should throw SerialException"); } catch (SerialException e) { // expected } } Shall we follow RI or spec for this case? We encounter many similar non-bug differences in SerialBlob, and IMHO, we'd better follow spec and not copy RI's bug. What's your opnion? Thanks! -- Best regards, Andrew Zhang ------=_Part_87723_6290431.1173235887356--