incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject svn commit: r833277 - in /sling/trunk/contrib/jcr/resource2/src: main/java/org/apache/sling/jcr/resource/internal/ test/java/org/apache/sling/jcr/resource/internal/helper/ test/java/org/apache/sling/jcr/resource/internal/helper/jcr/
Date Fri, 06 Nov 2009 02:19:36 GMT
Author: ieb
Date: Fri Nov  6 02:19:35 2009
New Revision: 833277

URL: http://svn.apache.org/viewvc?rev=833277&view=rev
Log:
SLING-1156
Adjusted to minimse the patch before merging back out of contrib.

Modified:
    sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
    sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
    sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java
    sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResourceTest.java

Modified: sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java?rev=833277&r1=833276&r2=833277&view=diff
==============================================================================
--- sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
(original)
+++ sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
Fri Nov  6 02:19:35 2009
@@ -91,8 +91,7 @@
     private final MapEntries resourceMapper;
 
     public JcrResourceResolver2(JcrResourceProviderEntry rootProvider,
-            JcrResourceResolverFactoryImpl factory, MapEntries resourceMapper) {
-        
+            JcrResourceResolverFactoryImpl factory, MapEntries resourceMapper) {        
         this.rootProvider = rootProvider;
         this.factory = factory;
         this.resourceMapper = resourceMapper;

Modified: sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=833277&r1=833276&r2=833277&view=diff
==============================================================================
--- sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
(original)
+++ sling/trunk/contrib/jcr/resource2/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Fri Nov  6 02:19:35 2009
@@ -223,8 +223,7 @@
     public ResourceResolver getResourceResolver(Session session) {
         JcrResourceProviderEntry sessionRoot = new JcrResourceProviderEntry(
             session, rootProviderEntry, getJcrResourceTypeProviders(),
-            this.getDynamicClassLoader());
-        
+            this.getDynamicClassLoader());        
 
         return new JcrResourceResolver2(sessionRoot, this, mapEntries);
     }

Modified: sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java?rev=833277&r1=833276&r2=833277&view=diff
==============================================================================
--- sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java
(original)
+++ sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java
Fri Nov  6 02:19:35 2009
@@ -147,7 +147,6 @@
         assertEquals(second, root.getResource(null, "/rootel/child/html.js"));
 
         root.removeResourceProvider(firstPath, first, null);
-        
 
         assertEquals(rootProvider, root.getResource(null, "/"));
         assertEquals(rootProvider, root.getResource(null, "/rootel/sddsf/sdfsdf/html.js"));
@@ -158,7 +157,7 @@
 
         assertEquals(rootProvider, root.getResource(null, "/"));
         assertEquals(first, root.getResource(null, "/rootel/html.js"));
-        assertEquals(second,root.getResource(null, "/rootel/child/html.js"));
+        assertEquals(second, root.getResource(null, "/rootel/child/html.js"));
     }
 
     protected void assertEquals(ResourceProvider resProvider, Resource res) {

Modified: sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResourceTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResourceTest.java?rev=833277&r1=833276&r2=833277&view=diff
==============================================================================
--- sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResourceTest.java
(original)
+++ sling/trunk/contrib/jcr/resource2/src/test/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResourceTest.java
Fri Nov  6 02:19:35 2009
@@ -30,8 +30,8 @@
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceMetadata;
+import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.jcr.resource.JcrResourceConstants;
-import org.apache.sling.jcr.resource.JcrResourceUtil;
 
 public class JcrNodeResourceTest extends JcrItemResourceTestBase {
 
@@ -140,7 +140,7 @@
 
         jnr = new JcrNodeResource(resourceResolver, node, null, null);
         assertEquals(typeName, jnr.getResourceType());
-        assertEquals(superTypeName, JcrResourceUtil.getResourceSuperType(jnr));
+        assertEquals(superTypeName, ResourceUtil.findResourceSuperType(jnr));
 
         // overwrite super type with direct property
         String otherSuperTypeName = "othersupertype";
@@ -235,14 +235,4 @@
         assertEquals(TEST_TYPE, rm.getContentType());
         assertEquals(TEST_ENCODING, rm.getCharacterEncoding());
     }
-
-    private void assertProperty(Object expected, Object actual) {
-        if (expected != null) {
-            assertNotNull(actual);
-
-            assertEquals(expected, actual);
-        } else {
-            assertNull(actual);
-        }
-    }
 }



Mime
View raw message