Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 15561 invoked from network); 21 Jun 2005 10:26:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2005 10:26:32 -0000 Received: (qmail 64949 invoked by uid 500); 21 Jun 2005 10:26:22 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 64817 invoked by uid 500); 21 Jun 2005 10:26:20 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 64786 invoked by uid 99); 21 Jun 2005 10:26:19 -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; Tue, 21 Jun 2005 03:26:18 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id CB30113 for ; Tue, 21 Jun 2005 12:26:17 +0200 (CEST) Message-ID: <2116368059.1119349577830.JavaMail.jira@ajax.apache.org> Date: Tue, 21 Jun 2005 12:26:17 +0200 (CEST) From: "Dyre Tjeldvoll (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-336) The wrong overload of StandardException::newException() is used in some cases In-Reply-To: <918672776.1117976080291.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-336?page=all ] Dyre Tjeldvoll updated DERBY-336: --------------------------------- Attachment: derby-336.diff derby-336.stat derbyall_report.txt The patch fixes the cases where an incorrect overload of StandardException.newException() is used. I used the better matching illegal overload trick to find these cases. Only the two illegal overloads that detected errors have been included in the patch. > The wrong overload of StandardException::newException() is used in some cases > ----------------------------------------------------------------------------- > > Key: DERBY-336 > URL: http://issues.apache.org/jira/browse/DERBY-336 > Project: Derby > Type: Bug > Environment: Any > Reporter: Dyre Tjeldvoll > Assignee: Dyre Tjeldvoll > Priority: Trivial > Attachments: derby-336.diff, derby-336.stat, derbyall_report.txt > > When looking at DERBY-128 it became clear that the wrong overload of StandardException::newException() was used when reporting > SQLState.SERVICE_DIRECTORY_CREATE_ERROR. The message string only takes one parameter so only one additional parameter (other than Throwable) should be used: > PersistentServiceImpl.java:676 > throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, > serviceDirectory, null); > // Calls StandardException.newException(String, Object, Object) > // Should call StandardException.newException(String, Object)? Or StandardException.newException(String, Throwable, Object)? With the IOException as > // Throwable? > PersistentServiceImpl.java:692 > throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, name, t); > // Calls StandardException.newException(String, Object, Object) > // Should call StandardException.newException(String, Throwable, Object)? > BaseDataFileFactory.java:279 > throw StandardException.newException( SQLState.SERVICE_DIRECTORY_CREATE_ERROR, dataDirectory, ioe); > // Calls StandardException.newException(String, Object, Object) > // Should call StandardException.newException(String, Throwable, Object)? -- 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