[jboss-cvs] JBossAS SVN: r94965 - projects/jboss-cl/branches/vfs3-int/classloading-vfs/src/test/java/org/jboss/test/classloading/vfs/policy/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 15 12:50:01 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-10-15 12:50:00 -0400 (Thu, 15 Oct 2009)
New Revision: 94965
Modified:
projects/jboss-cl/branches/vfs3-int/classloading-vfs/src/test/java/org/jboss/test/classloading/vfs/policy/test/ExportAllUnitTestCase.java
Log:
Fix some tests to compile, though they are semantically wrong
Modified: projects/jboss-cl/branches/vfs3-int/classloading-vfs/src/test/java/org/jboss/test/classloading/vfs/policy/test/ExportAllUnitTestCase.java
===================================================================
--- projects/jboss-cl/branches/vfs3-int/classloading-vfs/src/test/java/org/jboss/test/classloading/vfs/policy/test/ExportAllUnitTestCase.java 2009-10-15 16:49:52 UTC (rev 94964)
+++ projects/jboss-cl/branches/vfs3-int/classloading-vfs/src/test/java/org/jboss/test/classloading/vfs/policy/test/ExportAllUnitTestCase.java 2009-10-15 16:50:00 UTC (rev 94965)
@@ -103,26 +103,14 @@
{
URL baseURL = getResource("/classloader");
assertNotNull(baseURL);
- VirtualFile base = VFS.getRoot(baseURL);
+ VirtualFile base = VFS.getChild(baseURL);
VirtualFile[] files = new VirtualFile[urls.length];
for (int i = 0; i < urls.length; ++i)
{
- try
- {
- files[i] = base.getChild(urls[i]);
- }
- catch (IOException ignored)
- {
- }
+ files[i] = base.getChild(urls[i]);
if (files[i] == null && i > 0)
{
- try
- {
- files[i] = files[0].getChild(urls[i]);
- }
- catch (IOException ignored)
- {
- }
+ files[i] = files[0].getChild(urls[i]);
}
if (files[i] == null)
fail("Can't find " + urls[i]);
@@ -134,22 +122,10 @@
excludedFiles = new VirtualFile[excluded.length];
for (int i = 0; i < excluded.length; ++i)
{
- try
- {
- excludedFiles[i] = base.getChild(excluded[i]);
- }
- catch (IOException ignored)
- {
- }
+ excludedFiles[i] = base.getChild(excluded[i]);
if (excludedFiles[i] == null)
{
- try
- {
- excludedFiles[i] = files[0].getChild(excluded[i]);
- }
- catch (IOException ignored)
- {
- }
+ excludedFiles[i] = files[0].getChild(excluded[i]);
}
if (excludedFiles[i] == null)
fail("Can't find " + excluded[i]);
@@ -168,7 +144,7 @@
URL url = getResource(urlString);
if (url != null)
{
- files[i]= VFS.getRoot(url);
+ files[i]= VFS.getChild(url);
}
else
{
@@ -189,7 +165,7 @@
URL url = getResource(urlString);
if (url != null)
{
- excludedFiles[i]= VFS.getRoot(url);
+ excludedFiles[i]= VFS.getChild(url);
}
else
{
@@ -220,7 +196,7 @@
throws Exception
{
URL testjar1URL = getResource("/classloader/testjar1");
- VirtualFile testjar1 = VFS.getRoot(testjar1URL);
+ VirtualFile testjar1 = VFS.getChild(testjar1URL);
VFSClassLoaderPolicy policy = VFSClassLoaderPolicy.createVFSClassLoaderPolicy(testjar1);
policy.setExportAll(ExportAll.ALL);
@@ -233,7 +209,7 @@
throws Exception
{
URL testwar1URL = getResource("/classloader/testwar1.war");
- VirtualFile testwar1 = VFS.getRoot(testwar1URL);
+ VirtualFile testwar1 = VFS.getChild(testwar1URL);
VFSClassLoaderPolicy policy = VFSClassLoaderPolicy.createVFSClassLoaderPolicy(testwar1);
policy.setExportAll(ExportAll.NON_EMPTY);
policy.setImportAll(true);
@@ -381,7 +357,7 @@
throws Exception
{
URL testjar3URL = getResource("/classloader/testjar3");
- VirtualFile testjar3 = VFS.getRoot(testjar3URL);
+ VirtualFile testjar3 = VFS.getChild(testjar3URL);
VirtualFile testjar3subjar = testjar3.getChild("subjar1.jar");
assertNotNull(testjar3subjar);
VFSClassLoaderPolicy policy = VFSClassLoaderPolicy.createVFSClassLoaderPolicy(testjar3, testjar3subjar);
More information about the jboss-cvs-commits
mailing list