Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 2900 invoked from network); 7 Oct 2008 07:42:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Oct 2008 07:42:05 -0000 Received: (qmail 24354 invoked by uid 500); 7 Oct 2008 07:42:03 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 24321 invoked by uid 500); 7 Oct 2008 07:42:03 -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 24310 invoked by uid 99); 7 Oct 2008 07:42:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2008 00:42:03 -0700 X-ASF-Spam-Status: No, hits=-1999.9 required=10.0 tests=ALL_TRUSTED,DNS_FROM_SECURITYSAGE X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Oct 2008 07:41:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4FD22234C218 for ; Tue, 7 Oct 2008 00:41:44 -0700 (PDT) Message-ID: <1129294082.1223365304326.JavaMail.jira@brutus> Date: Tue, 7 Oct 2008 00:41:44 -0700 (PDT) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3728) Fix error handling in PrivilegedFileOpsForTests In-Reply-To: <13926439.1213866225111.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kristian Waagan updated DERBY-3728: ----------------------------------- Derby Info: [Patch Available] > Fix error handling in PrivilegedFileOpsForTests > ----------------------------------------------- > > Key: DERBY-3728 > URL: https://issues.apache.org/jira/browse/DERBY-3728 > Project: Derby > Issue Type: Bug > Components: Test > Affects Versions: 10.5.0.0 > Reporter: Kristian Waagan > Assignee: Kristian Waagan > Priority: Minor > Fix For: 10.5.0.0 > > Attachments: derby-3728-1a.diff > > > The exception handling in this utility class is unclear and can in some cases cause ClassCastException to be thrown. > Note that SecurityException is a runtime exception. > Potential issues to be fixed: > 1) Avoid possibility of ClassCastException in 'getFileInputStream' > 2) Don't include SecurityException in the signature (throws clause) > 3) Document SecurityException in JavaDoc. > Points 2 and 3 leads to the option of not catching SecurityException, which allows the code to be written more concisely and we can use PrivilegedAction instead of PrivilegedExceptionAction in some cases. > There is also a missing character in the class name in the header, and an invalid JavaDoc tag in the class JavaDoc. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.