X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 61EF6329F40 for ; Thu, 21 Oct 2004 20:16:03 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30252-08 for ; Thu, 21 Oct 2004 19:16:00 +0000 (GMT) Received: from www.postgresql.com (www.postgresql.com [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id A114532A923 for ; Thu, 21 Oct 2004 20:16:01 +0100 (BST) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by www.postgresql.com (Postfix) with SMTP id 2DD295A1004 for ; Thu, 21 Oct 2004 20:15:57 +0100 (BST) Received: (qmail 5961 invoked by uid 1112); 21 Oct 2004 19:15:45 -0000 Date: Thu, 21 Oct 2004 14:15:45 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Christian Niles Cc: pgsql-jdbc@postgresql.org Subject: Re: ClassCastException in getShort(int) In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/223 X-Sequence-Number: 11328 On Thu, 21 Oct 2004, Christian Niles wrote: > I've found a bug in AbstractJdbc1Statement.getShort(int) which causes a > ClassCastException. > > The bug seems to be that getShort(int) casts the Short to an Integer: I've fixed this in both 7.4 and 8.0 trees. Thanks. > All the other methods seem to cast the appropriate type, except > getByte(int), which also casts to Integer (I haven't tested > getByte(int) though). The getByte case is a can't happen situation, and I've put in an Exception if the code actually gets there. Kris Jurka