[jboss-cvs] JBossAS SVN: r91902 - projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jul 31 18:26:53 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-07-31 18:26:53 -0400 (Fri, 31 Jul 2009)
New Revision: 91902
Modified:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/VFS.java
Log:
Deprecate getRoot(*), replace with getChild(URI/URL) methods
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/VFS.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/VFS.java 2009-07-31 22:15:44 UTC (rev 91901)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/virtual/VFS.java 2009-07-31 22:26:53 UTC (rev 91902)
@@ -115,7 +115,10 @@
* @param url the url
* @return the file matching url
* @throws IOException if there is a problem accessing the VFS
+ * @deprecated use {@link #getChild(URL)} instead
*/
+ @Deprecated
+ @SuppressWarnings("deprecation")
public static VirtualFile getRoot(URL url) throws IOException
{
try
@@ -137,7 +140,9 @@
* @param uri the uri
* @return the file matching uri
* @throws IOException if there is a problem accessing the VFS
+ * @deprecated use {@link #getChild(URI)} instead
*/
+ @Deprecated
public static VirtualFile getRoot(URI uri) throws IOException
{
return getInstance().getChild(uri.getPath());
@@ -203,6 +208,30 @@
/**
* Find a virtual file.
*
+ * @param url the URL whose path component is the child path
+ * @return the child
+ * @throws IllegalArgumentException if the path is null
+ */
+ public VirtualFile getChild(URL url) throws URISyntaxException
+ {
+ return getChild(url.toURI());
+ }
+
+ /**
+ * Find a virtual file.
+ *
+ * @param uri the URI whose path component is the child path
+ * @return the child
+ * @throws IllegalArgumentException if the path is null
+ */
+ public VirtualFile getChild(URI uri)
+ {
+ return getChild(uri.getPath());
+ }
+
+ /**
+ * Find a virtual file.
+ *
* @param path the child path
* @return the child
* @throws IllegalArgumentException if the path is null
More information about the jboss-cvs-commits
mailing list