jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r635583 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java
Date Mon, 10 Mar 2008 15:45:11 GMT
Author: stefan
Date: Mon Mar 10 08:45:10 2008
New Revision: 635583

URL: http://svn.apache.org/viewvc?rev=635583&view=rev
Log:
JCR-1444: The getOutputStream of the MemoryFileSystem class can replace a folder with a newly
created file

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java?rev=635583&r1=635582&r2=635583&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java
Mon Mar 10 08:45:10 2008
@@ -133,6 +133,10 @@
 
     public OutputStream getOutputStream(String filePath)
             throws FileSystemException {
+        if (isFolder(filePath)) {
+            throw new FileSystemException("path denotes folder: " + filePath);
+        }
+
         String folderPath = filePath;
         if (filePath.lastIndexOf(FileSystem.SEPARATOR) > 0) {
             folderPath = filePath.substring(0, filePath.lastIndexOf("/"));



Mime
View raw message