[jboss-cvs] JBossAS SVN: r69907 - projects/microcontainer/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/structure.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 18 15:25:18 EST 2008


Author: adrian at jboss.org
Date: 2008-02-18 15:25:18 -0500 (Mon, 18 Feb 2008)
New Revision: 69907

Modified:
   projects/microcontainer/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java
Log:
This hack is no longer necessary when running the tests under Maven

Modified: projects/microcontainer/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java
===================================================================
--- projects/microcontainer/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java	2008-02-18 20:12:07 UTC (rev 69906)
+++ projects/microcontainer/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java	2008-02-18 20:25:18 UTC (rev 69907)
@@ -21,10 +21,7 @@
 */
 package org.jboss.test.deployers.vfs.structure;
 
-import java.lang.reflect.Field;
 import java.net.URL;
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -43,7 +40,6 @@
 import org.jboss.test.BaseTestCase;
 import org.jboss.virtual.VFS;
 import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.protocol.vfsfile.Handler;
 
 /**
  * AbstractStructureUnitTestCase.
@@ -264,25 +260,7 @@
 
    protected VirtualFile getVirtualFile(String root, String path) throws Exception
    {
-      // TODO JBMICROCONT-185 THIS IS HACK TO MAKE THE TEST WORK IN MAVEN ???
-      try
-      {
-         URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory()
-         {
-            public URLStreamHandler createURLStreamHandler(String protocol)
-            {
-               if ("vfsfile".equals(protocol))
-                  return new Handler();
-               return null;
-            }
-         });
-      }
-      catch (Error ignored)
-      {
-      }
       URL url = getResource(root);
-      Field field = URL.class.getDeclaredField("factory");
-      field.setAccessible(true);
       return VFS.getVirtualFile(url, path);
    }
 




More information about the jboss-cvs-commits mailing list