jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r804187 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem: MemoryFile.java MemoryFileSystem.java MemoryFileSystemEntry.java MemoryFolder.java
Date Fri, 14 Aug 2009 12:26:35 GMT
Author: thomasm
Date: Fri Aug 14 12:26:35 2009
New Revision: 804187

URL: http://svn.apache.org/viewvc?rev=804187&view=rev
Log:
JCR-2260 MemoryFileSystem.deleteFolder deletes all folders starting with this name

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFile.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFile.java?rev=804187&r1=804186&r2=804187&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFile.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFile.java
Fri Aug 14 12:26:35 2009
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.core.fs.mem;
 
+/**
+ * An in-memory file.
+ */
 public class MemoryFile extends MemoryFileSystemEntry {
 
     private byte[] data = new byte[0];

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=804187&r1=804186&r2=804187&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
Fri Aug 14 12:26:35 2009
@@ -28,10 +28,12 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.core.fs.FileSystem;
 import org.apache.jackrabbit.core.fs.FileSystemException;
 
+/**
+ * An in-memory file system implementation.
+ */
 public class MemoryFileSystem implements FileSystem {
 
     private Map entries = new HashMap();
@@ -79,7 +81,7 @@
         Set selectedNames = new HashSet();
         for (Iterator iter = allNames.iterator(); iter.hasNext();) {
             String name = (String) iter.next();
-            if (name.startsWith(folderPath)) {
+            if (name.equals(folderPath) || name.startsWith(folderPath + SEPARATOR)) {
                 selectedNames.add(name);
             }
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystemEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystemEntry.java?rev=804187&r1=804186&r2=804187&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystemEntry.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystemEntry.java
Fri Aug 14 12:26:35 2009
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.core.fs.mem;
 
+/**
+ * An in-memory file or folder.
+ */
 public abstract class MemoryFileSystemEntry {
 
     private long lastModified;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFolder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFolder.java?rev=804187&r1=804186&r2=804187&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFolder.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFolder.java
Fri Aug 14 12:26:35 2009
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.core.fs.mem;
 
+/**
+ * An in-memory folder.
+ */
 public class MemoryFolder extends MemoryFileSystemEntry {
 
     public boolean isFolder() {



Mime
View raw message