Author: alesj
Date: 2008-11-23 16:45:58 -0500 (Sun, 23 Nov 2008)
New Revision: 81463
Modified:
projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java
projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/VfsArchiveBrowserFactory.java
Log:
Cleanup, deprecation.
Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java 2008-11-23 08:05:56 UTC (rev 81462)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java 2008-11-23 21:45:58 UTC (rev 81463)
@@ -27,7 +27,6 @@
import java.util.List;
import org.jboss.virtual.plugins.vfs.helpers.WrappingVirtualFileHandlerVisitor;
-import org.jboss.virtual.plugins.context.VfsArchiveBrowserFactory;
import org.jboss.virtual.spi.VFSContext;
import org.jboss.virtual.spi.VFSContextFactory;
import org.jboss.virtual.spi.VFSContextFactoryLocator;
@@ -35,7 +34,6 @@
import org.jboss.virtual.spi.ExceptionHandler;
import org.jboss.virtual.spi.cache.VFSCacheFactory;
import org.jboss.virtual.spi.cache.VFSCache;
-import org.jboss.util.file.ArchiveBrowser;
/**
* Virtual File System
@@ -71,6 +69,7 @@
/**
* Initialize VFS protocol handlers package property.
*/
+ @SuppressWarnings({"deprecation", "unchecked"})
public static void init()
{
String pkgs = System.getProperty("java.protocol.handler.pkgs");
@@ -84,10 +83,11 @@
pkgs += "|org.jboss.virtual.protocol";
System.setProperty("java.protocol.handler.pkgs", pkgs);
}
+ org.jboss.virtual.plugins.context.VfsArchiveBrowserFactory factory = org.jboss.virtual.plugins.context.VfsArchiveBrowserFactory.INSTANCE;
// keep this until AOP and HEM uses VFS internally instead of the stupid ArchiveBrowser crap.
- ArchiveBrowser.factoryFinder.put("vfsfile", new VfsArchiveBrowserFactory());
- ArchiveBrowser.factoryFinder.put("vfsjar", new VfsArchiveBrowserFactory());
- ArchiveBrowser.factoryFinder.put("vfs", new VfsArchiveBrowserFactory());
+ org.jboss.util.file.ArchiveBrowser.factoryFinder.put("vfsfile", factory);
+ org.jboss.util.file.ArchiveBrowser.factoryFinder.put("vfsjar", factory);
+ org.jboss.util.file.ArchiveBrowser.factoryFinder.put("vfs", factory);
}
/**
@@ -173,6 +173,7 @@
* @throws IOException if there is a problem accessing the VFS
* @throws IllegalArgumentException if the rootURL or name is null
*/
+ @SuppressWarnings("deprecation")
public static VirtualFile getVirtualFile(URI rootURI, String name) throws IOException
{
VFS vfs = getVFS(rootURI);
@@ -239,6 +240,7 @@
* @throws IOException if there is a problem accessing the VFS
* @throws IllegalArgumentException if the rootURL or name is null
*/
+ @SuppressWarnings("deprecation")
public static VirtualFile getVirtualFile(URL rootURL, String name) throws IOException
{
VFS vfs = getVFS(rootURL);
@@ -309,6 +311,7 @@
* @throws IllegalArgumentException if the path is null
*/
@Deprecated
+ @SuppressWarnings("deprecation")
public VirtualFile findChildFromRoot(String path) throws IOException
{
return findChild(path);
Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/VfsArchiveBrowserFactory.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/VfsArchiveBrowserFactory.java 2008-11-23 08:05:56 UTC (rev 81462)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/VfsArchiveBrowserFactory.java 2008-11-23 21:45:58 UTC (rev 81463)
@@ -25,22 +25,26 @@
import java.net.URL;
import java.util.Iterator;
-import org.jboss.util.file.ArchiveBrowser;
import org.jboss.util.file.ArchiveBrowserFactory;
import org.jboss.virtual.plugins.vfs.VirtualFileURLConnection;
/**
- * This is a bridge to an older, crappier API written by myself.
+ * This is a bridge to an older, crappier API written by Bill.
*
* @deprecated
*
* @author <a href="bill at jboss.com">Bill Burke</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
* @version $Revision: 1.1 $
*/
+ at SuppressWarnings("deprecation")
public class VfsArchiveBrowserFactory implements ArchiveBrowserFactory
{
+ /** VFS archive browser instance */
+ public static final VfsArchiveBrowserFactory INSTANCE = new VfsArchiveBrowserFactory();
+
@SuppressWarnings("deprecation")
- public Iterator create(URL url, ArchiveBrowser.Filter filter)
+ public Iterator create(URL url, org.jboss.util.file.ArchiveBrowser.Filter filter)
{
try
{