[jboss-cvs] JBossAS SVN: r101049 - in projects/metadata/common/trunk: src/main/java/org/jboss/metadata/serviceref and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 16 17:05:39 EST 2010
Author: johnbailey
Date: 2010-02-16 17:05:39 -0500 (Tue, 16 Feb 2010)
New Revision: 101049
Modified:
projects/metadata/common/trunk/pom.xml
projects/metadata/common/trunk/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java
Log:
[JBMETA-253] - Integrated jboss-metadata-common with VFS3
Modified: projects/metadata/common/trunk/pom.xml
===================================================================
--- projects/metadata/common/trunk/pom.xml 2010-02-16 21:55:55 UTC (rev 101048)
+++ projects/metadata/common/trunk/pom.xml 2010-02-16 22:05:39 UTC (rev 101049)
@@ -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</version>
</dependency>
<dependency>
Modified: projects/metadata/common/trunk/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java 2010-02-16 21:55:55 UTC (rev 101048)
+++ projects/metadata/common/trunk/src/main/java/org/jboss/metadata/serviceref/VirtualFileAdaptor.java 2010-02-16 22:05:39 UTC (rev 101049)
@@ -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 $
@@ -82,21 +82,27 @@
* @return virtual file root
* @throws IOException for any error
*/
- @SuppressWarnings("deprecation")
protected VirtualFile getFile() throws IOException
{
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;
}
- @SuppressWarnings("deprecation")
public UnifiedVirtualFile findChild(String child) throws IOException
{
- VirtualFile vf = getFile().findChild(child);
+ VirtualFile vf = getFile().getChild(child);
return new VirtualFileAdaptor(vf);
}
@@ -117,12 +123,12 @@
URL url = rootUrl;
if (url == null)
{
- VFS vfs = getFile().getVFS();
- url = vfs.getRoot().toURL();
+ VirtualFile parentFile = getFile().getParent();
+ url = parentFile != null ? parentFile.toURL() : null;
}
String pathName = path;
if (pathName == null)
- pathName = getFile().getPathName();
+ pathName = getFile().getName();
ObjectOutputStream.PutField fields = out.putFields();
fields.put("rootUrl", url);
More information about the jboss-cvs-commits
mailing list