Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 35985 invoked from network); 8 Jan 2007 15:35:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2007 15:35:59 -0000 Received: (qmail 31038 invoked by uid 500); 8 Jan 2007 15:35:45 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 31014 invoked by uid 500); 8 Jan 2007 15:35:45 -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 30979 invoked by uid 99); 8 Jan 2007 15:35:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 07:35:45 -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 66.249.92.171 as permitted sender) Received: from [66.249.92.171] (HELO ug-out-1314.google.com) (66.249.92.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 07:35:35 -0800 Received: by ug-out-1314.google.com with SMTP id z36so5326279uge for ; Mon, 08 Jan 2007 07:35:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=nIV/eQK/CpimQwi+Ak+ELf1+SHtUZoVeo4MkAJu87g3FHLI3LiRGJ0qnhQNsgeL70JpdoL+MLWd09idvYNXpiJ6VPwtbeEM8bh0l9NyLfsYq/FXdqpgY1vb8ZGbE3RrrMKz1M46iYiFA88go1TKDOF6K01uBQNaZbHCtx52M9UM= Received: by 10.82.135.13 with SMTP id i13mr2266160bud.1168270513605; Mon, 08 Jan 2007 07:35:13 -0800 (PST) Received: by 10.82.112.18 with HTTP; Mon, 8 Jan 2007 07:35:12 -0800 (PST) Message-ID: <4d0b24970701080735k58e4159m5eaf85e1012d526a@mail.gmail.com> Date: Mon, 8 Jan 2007 23:35:12 +0800 From: "Andrew Zhang" To: dev@harmony.apache.org Subject: [classlib][sql] Compatibility issue of SerialBlob.setBinaryStream(long pos) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_73519_2928779.1168270512963" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_73519_2928779.1168270512963 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi guys, sorry, SerialBlob compatibility problem again. It's the last unimplemented method of SerialBlob, setBinaryStream(long pos). The spec says "throws SerialException - if the SerialBlob in not instantiated with a Blob object that supports setBinaryStream()". What should happen if the SerialBlob is instantiated with a byte buffer? As my understanding, it should throw SerialException, but I feel the spec is a little ambiguous, is it? I need native speakers' help. :-) Anyway, I think throws SerialException sounds reasonable to me if it's instantiated with a byte buffer. But RI throws NullPointerException instead. Following test shows the problem: public void testSetBinaryStreamJ() throws Exception { byte[] buf = { 1, 2, 3, 4, 5, 6, 7, 8 }; SerialBlob serialBlob = new SerialBlob(buf); serialBlob.setBinaryStream(1); } Shall we follow RI or throw SerialException? Thanks! -- Best regards, Andrew Zhang ------=_Part_73519_2928779.1168270512963--