commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1522005 - in /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io: DefaultFileSystem.java FileSystem.java VFSFileSystem.java
Date Wed, 11 Sep 2013 19:37:53 GMT
Author: oheger
Date: Wed Sep 11 19:37:53 2013
New Revision: 1522005

URL: http://svn.apache.org/r1522005
Log:
Removed getInputStream(String, String) method from FileSystem.

This method is no longer called by any component.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/DefaultFileSystem.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/FileSystem.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/VFSFileSystem.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/DefaultFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/DefaultFileSystem.java?rev=1522005&r1=1522004&r2=1522005&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/DefaultFileSystem.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/DefaultFileSystem.java
Wed Sep 11 19:37:53 2013
@@ -45,30 +45,6 @@ public class DefaultFileSystem extends F
     private Log log = LogFactory.getLog(DefaultFileSystem.class);
 
     @Override
-    public InputStream getInputStream(String basePath, String fileName)
-        throws ConfigurationException
-    {
-        try
-        {
-            URL url = FileLocatorUtils.locate(this, basePath, fileName);
-
-            if (url == null)
-            {
-                throw new ConfigurationException("Cannot locate configuration source " +
fileName);
-            }
-            return getInputStream(url);
-        }
-        catch (ConfigurationException e)
-        {
-            throw e;
-        }
-        catch (Exception e)
-        {
-            throw new ConfigurationException("Unable to load the configuration file " + fileName,
e);
-        }
-    }
-
-    @Override
     public InputStream getInputStream(URL url) throws ConfigurationException
     {
         // throw an exception if the target URL is a directory

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/FileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/FileSystem.java?rev=1522005&r1=1522004&r2=1522005&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/FileSystem.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/FileSystem.java
Wed Sep 11 19:37:53 2013
@@ -161,9 +161,6 @@ public abstract class FileSystem
         return this.optionsProvider;
     }
 
-    public abstract InputStream getInputStream(String basePath, String fileName)
-            throws ConfigurationException;
-
     public abstract InputStream getInputStream(URL url) throws ConfigurationException;
 
     public abstract OutputStream getOutputStream(URL url) throws ConfigurationException;

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/VFSFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/VFSFileSystem.java?rev=1522005&r1=1522004&r2=1522005&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/VFSFileSystem.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/io/VFSFileSystem.java
Wed Sep 11 19:37:53 2013
@@ -54,46 +54,6 @@ public class VFSFileSystem extends Defau
     }
 
     @Override
-    public InputStream getInputStream(String basePath, String fileName)
-        throws ConfigurationException
-    {
-        try
-        {
-            FileSystemManager manager = VFS.getManager();
-            FileName path;
-            if (basePath != null)
-            {
-                FileName base = manager.resolveURI(basePath);
-                path = manager.resolveName(base, fileName);
-            }
-            else
-            {
-                FileName file = manager.resolveURI(fileName);
-                FileName base = file.getParent();
-                path = manager.resolveName(base, file.getBaseName());
-            }
-            FileSystemOptions opts = getOptions(path.getScheme());
-            FileObject file = (opts == null) ? manager.resolveFile(path.getURI())
-                    : manager.resolveFile(path.getURI(), opts);
-            FileContent content = file.getContent();
-            if (content == null)
-            {
-                String msg = "Cannot access content of " + file.getName().getFriendlyURI();
-                throw new ConfigurationException(msg);
-            }
-            return content.getInputStream();
-        }
-        catch (ConfigurationException e)
-        {
-            throw e;
-        }
-        catch (Exception e)
-        {
-            throw new ConfigurationException("Unable to load the configuration file " + fileName,
e);
-        }
-    }
-
-    @Override
     public InputStream getInputStream(URL url) throws ConfigurationException
     {
         FileObject file;



Mime
View raw message