adammurdoch 2002/11/24 21:51:15 Modified: vfs/src/test/org/apache/commons/vfs/test ProviderReadTests.java FileInfo.java vfs/src/test-data test.mf Added: vfs/src/test-data/code/sealed AnotherClass.java Log: Added another class for the ClassLoader tests to use. Revision Changes Path 1.4 +7 -5 jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderReadTests.java Index: ProviderReadTests.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderReadTests.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ProviderReadTests.java 23 Nov 2002 00:32:12 -0000 1.3 +++ ProviderReadTests.java 25 Nov 2002 05:51:15 -0000 1.4 @@ -524,15 +524,17 @@ base.addChild( "empty.txt", FileType.FILE ); base.addChild( "emptydir", FileType.FOLDER ); - final FileInfo dir = new FileInfo( "dir1", FileType.FOLDER ); - base.addChild( dir ); + final FileInfo dir = base.addChild( "dir1", FileType.FOLDER ); dir.addChild( "file1.txt", FileType.FILE ); dir.addChild( "file2.txt", FileType.FILE ); dir.addChild( "file3.txt", FileType.FILE ); - final FileInfo code = new FileInfo( "code", FileType.FOLDER ); - base.addChild( code ); + final FileInfo code = base.addChild( "code", FileType.FOLDER ); code.addChild( "ClassToLoad.class", FileType.FILE ); + + final FileInfo sealed = code.addChild( "sealed", FileType.FOLDER ); + sealed.addChild( "AnotherClass.class", FileType.FILE ); + return base; } 1.5 +4 -2 jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/FileInfo.java Index: FileInfo.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/FileInfo.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FileInfo.java 23 Nov 2002 00:41:10 -0000 1.4 +++ FileInfo.java 25 Nov 2002 05:51:15 -0000 1.5 @@ -88,9 +88,11 @@ } /** Adds a child. */ - public void addChild( final String baseName, final FileType type ) + public FileInfo addChild( final String baseName, final FileType type ) { - addChild( new FileInfo( baseName, type ) ); + final FileInfo child = new FileInfo( baseName, type ); + addChild( child ); + return child; } /** Adds a bunch of children. */ 1.2 +3 -0 jakarta-commons-sandbox/vfs/src/test-data/test.mf Index: test.mf =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test-data/test.mf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test.mf 22 Aug 2002 01:32:49 -0000 1.1 +++ test.mf 25 Nov 2002 05:51:15 -0000 1.2 @@ -5,4 +5,7 @@ Implementation-Title: ImplTitle Implementation-Vendor: ImplVendor Implementation-Version: 1.1 +Sealed: false +Name: code/sealed/ +Sealed: true 1.1 jakarta-commons-sandbox/vfs/src/test-data/code/sealed/AnotherClass.java Index: AnotherClass.java =================================================================== /* ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Commons", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package code.sealed; /** * A test class for the ClassLoader tests. * * @author <a href="mailto:[EMAIL PROTECTED]">Adam Murdoch</a> * @version $Revision: 1.1 $ $Date: 2002/11/25 05:51:15 $ */ public class AnotherClass { }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>