Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C16CBCDB2 for ; Thu, 31 May 2012 18:47:24 +0000 (UTC) Received: (qmail 85431 invoked by uid 500); 31 May 2012 18:47:23 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 85320 invoked by uid 500); 31 May 2012 18:47:23 -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 85113 invoked by uid 99); 31 May 2012 18:47:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 18:47:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 6D3431402B8 for ; Thu, 31 May 2012 18:47:23 +0000 (UTC) Date: Thu, 31 May 2012 18:47:23 +0000 (UTC) From: "Sergey Grigorev (JIRA)" To: issues@commons.apache.org Message-ID: <1389460760.23110.1338490043449.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1535656448.20693.1338447502943.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (VFS-419) JarFileSystem incorrectly resolves file if it has been removed from the cache 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-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286818#comment-13286818 ] Sergey Grigorev commented on VFS-419: ------------------------------------- "return new JarFileObject(name, null, this, false)" doesn't create children for this object (in normal mode the object always has children). I've checked it and it fails. If there are no children JarURLConnectionImpl can't load classes from an archive (it loads objects such as xml files but not any classes at all). In my case I have to load classes from this jar file and run. I don't know how to make unit test to demonstrate this problem (only show some lines of code of my product maybe) > JarFileSystem incorrectly resolves file if it has been removed from the cache > ----------------------------------------------------------------------------- > > Key: VFS-419 > URL: https://issues.apache.org/jira/browse/VFS-419 > Project: Commons VFS > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Sergey Grigorev > Labels: core, patch > Fix For: 2.0 > > Attachments: JarFileSystem.java.patch > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > If I call fileSystemManager.resolveFile("jar: ... ") and the file was removed from cache, JarFileSystem calls method createFile(AbstractFileName name). This method is not overridden from ZipFileManager and works wrong (its return ZipFileObject instead JarFileObject). But i can override it and make return JarFileObject case this object won't have children and JarURLConnectionImpl won't work. It should reinvalidate cache and return the object with children objects. > I've added a patch to fix this problem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira