Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 80260 invoked from network); 27 Nov 2010 09:32:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Nov 2010 09:32:35 -0000 Received: (qmail 12948 invoked by uid 500); 27 Nov 2010 09:32:35 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 12700 invoked by uid 500); 27 Nov 2010 09:32:34 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 12690 invoked by uid 99); 27 Nov 2010 09:32:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Nov 2010 09:32:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Nov 2010 09:32:33 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAR9WDSB007086 for ; Sat, 27 Nov 2010 09:32:13 GMT Message-ID: <4189369.331891290850333409.JavaMail.jira@thor> Date: Sat, 27 Nov 2010 04:32:13 -0500 (EST) From: "Ralph Goers (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (VFS-337) AbstractFileObject ctor accepts FileName as a parameter, but actually requires AbstractFileName In-Reply-To: <9846729.9891289413873327.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VFS-337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ralph Goers resolved VFS-337. ----------------------------- Resolution: Fixed Fix Version/s: 2.0 AbstractFileObject and classes that extend it now take an AbstractFileName instead of a FileName. This also applies to the FileSystem and FileProvider. > AbstractFileObject ctor accepts FileName as a parameter, but actually requires AbstractFileName > ----------------------------------------------------------------------------------------------- > > Key: VFS-337 > URL: https://issues.apache.org/jira/browse/VFS-337 > Project: Commons VFS > Issue Type: Bug > Affects Versions: 1.0 > Reporter: Sebb > Fix For: 2.0 > > > The AbstractFileObject constructor accepts FileName as a parameter, but actually requires an AbstractFileName. > Anything else will generate a ClassCastException. > The reason for the cast is to allow access to the package-protected method void AbstractFileName#setType(FileType type) > Many of the AbstractFileObject methods rely on being able to invoke the setType method, so perhaps the parameter should be changed accordingly? > This will change the API and require changes to subclasses. > I'll add Javadoc to document the restriction. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.