[jboss-cvs] JBossAS SVN: r94819 - in projects/metadata/common/branches/vfs-int: src/main/java/org/jboss/metadata/serviceref and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 14 00:57:05 EDT 2009
Author: johnbailey
Date: 2009-10-14 00:57:05 -0400 (Wed, 14 Oct 2009)
New Revision: 94819
Modified:
projects/metadata/common/branches/vfs-int/pom.xml
projects/metadata/common/branches/vfs-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java
projects/metadata/common/branches/vfs-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java
Log:
Integrated with VFS3
Modified: projects/metadata/common/branches/vfs-int/pom.xml
===================================================================
--- projects/metadata/common/branches/vfs-int/pom.xml 2009-10-14 04:53:55 UTC (rev 94818)
+++ projects/metadata/common/branches/vfs-int/pom.xml 2009-10-14 04:57:05 UTC (rev 94819)
@@ -123,7 +123,7 @@
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-spi</artifactId>
- <version>2.0.5.GA</version>
+ <version>2.2.0.CR1</version>
</dependency>
<dependency>
@@ -181,7 +181,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
- <version>2.0.0.CR1</version>
+ <version>3.0.0.CR1-SNAPSHOT</version>
</dependency>
<dependency>
Modified: projects/metadata/common/branches/vfs-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java
===================================================================
--- projects/metadata/common/branches/vfs-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java 2009-10-14 04:53:55 UTC (rev 94818)
+++ projects/metadata/common/branches/vfs-int/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java 2009-10-14 04:57:05 UTC (rev 94819)
@@ -30,8 +30,8 @@
import java.util.LinkedList;
import java.util.List;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
// $Id: VirtualFileAdaptor.java 4049 2007-08-01 11:26:30Z thomas.diesler at jboss.com $
@@ -87,8 +87,14 @@
{
if (file == null)
{
- VirtualFile root = VFS.getRoot(rootUrl);
- file = root.findChild(path);
+ VirtualFile root;
+ try {
+ root = VFS.getChild(rootUrl);
+ }
+ catch (URISyntaxException e) {
+ throw new IOException("Unable to get VirtualFile from url: " + rootUrl, e);
+ }
+ file = root.getChild(path);
}
return file;
}
@@ -96,7 +102,7 @@
@SuppressWarnings("deprecation")
public UnifiedVirtualFile findChild(String child) throws IOException
{
- VirtualFile vf = getFile().findChild(child);
+ VirtualFile vf = getFile().getChild(child);
return new VirtualFileAdaptor(vf);
}
@@ -117,8 +123,7 @@
URL url = rootUrl;
if (url == null)
{
- VFS vfs = getFile().getVFS();
- url = vfs.getRoot().toURL();
+ url = VFS.getRootVirtualFile().toURL();
}
String pathName = path;
if (pathName == null)
Modified: projects/metadata/common/branches/vfs-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java
===================================================================
--- projects/metadata/common/branches/vfs-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java 2009-10-14 04:53:55 UTC (rev 94818)
+++ projects/metadata/common/branches/vfs-int/src/test/java/org/jboss/test/metadata/javaee/JBossXBTestDelegate.java 2009-10-14 04:57:05 UTC (rev 94819)
@@ -41,9 +41,6 @@
*/
public class JBossXBTestDelegate extends AbstractTestDelegate
{
- /** Whether initialization has been done */
- private static boolean done = false;
-
/** The unmarshaller factory */
protected UnmarshallerFactory unmarshallerFactory;
@@ -54,24 +51,6 @@
protected boolean validateSchema = false;
/**
- * Initialize
- */
- public synchronized static void init()
- {
- if (done)
- return;
- done = true;
- URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory());
- URLStreamHandlerFactory.preload();
- String handlerPkgs = System.getProperty("java.protocol.handler.pkgs");
- if (handlerPkgs != null)
- handlerPkgs += "|org.jboss.net.protocol";
- else
- handlerPkgs = "org.jboss.net.protocol";
- System.setProperty("java.protocol.handler.pkgs", handlerPkgs);
- }
-
- /**
* Create a new JBossXBTestDelegate.
*
* @param clazz the test class
@@ -85,7 +64,6 @@
public void setUp() throws Exception
{
super.setUp();
- init();
unmarshallerFactory = UnmarshallerFactory.newInstance();
initResolver();
initValidateSchema();
More information about the jboss-cvs-commits
mailing list