incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r832609 - /sling/trunk/bundles/jcr/contentloader/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java
Date Tue, 03 Nov 2009 23:40:11 GMT
Author: cziegeler
Date: Tue Nov  3 23:40:11 2009
New Revision: 832609

URL: http://svn.apache.org/viewvc?rev=832609&view=rev
Log:
Clean up code

Modified:
    sling/trunk/bundles/jcr/contentloader/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java

Modified: sling/trunk/bundles/jcr/contentloader/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java?rev=832609&r1=832608&r2=832609&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java
(original)
+++ sling/trunk/bundles/jcr/contentloader/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java
Tue Nov  3 23:40:11 2009
@@ -18,10 +18,6 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
-import junit.framework.TestCase;
-import org.apache.sling.jcr.contentloader.internal.ContentCreator;
-
-import javax.jcr.RepositoryException;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
@@ -33,6 +29,12 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.jcr.RepositoryException;
+
+import junit.framework.TestCase;
+
+import org.apache.sling.jcr.contentloader.internal.ContentCreator;
+
 public class XmlReaderTest extends TestCase {
 
     private XmlReader reader;
@@ -91,14 +93,12 @@
 	private static class MockContentCreator extends ArrayList<String> implements ContentCreator
{
 
         public static class FileDescription {
-            public String name;
             public InputStream data;
             public String mimeType;
             public long lastModified;
             public String content;
 
-            public FileDescription(String name, InputStream data, String mimeType, long lastModified)
throws IOException {
-                this.name = name;
+            public FileDescription(InputStream data, String mimeType, long lastModified)
throws IOException {
                 this.data = data;
                 this.mimeType = mimeType;
                 this.lastModified = lastModified;
@@ -134,7 +134,7 @@
 
         public void createFileAndResourceNode(String name, InputStream data, String mimeType,
long lastModified) throws RepositoryException {
             try {
-                this.filesCreated.add(new FileDescription(name, data, mimeType, lastModified));
+                this.filesCreated.add(new FileDescription( data, mimeType, lastModified));
             } catch (IOException e) {
                 throw new RuntimeException(e);
             }
@@ -143,7 +143,7 @@
         public boolean switchCurrentNode(String subPath, String newNodeType) throws RepositoryException
{
             return true;
         }
-        
+
 		public void createAce(String principal,
 				String[] grantedPrivileges, String[] deniedPrivileges)
 				throws RepositoryException {



Mime
View raw message