incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r883721 - in /sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal: JcrModifiablePropertyMapTest.java JcrResourceResolver2Test.java JcrResourceResolverTest.java helper/ResourceProviderEntryTest.java
Date Tue, 24 Nov 2009 15:01:19 GMT
Author: cziegeler
Date: Tue Nov 24 15:01:19 2009
New Revision: 883721

URL: http://svn.apache.org/viewvc?rev=883721&view=rev
Log:
Remove "2" from class names.

Added:
    sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java
  (contents, props changed)
      - copied, changed from r881350, sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2Test.java
Removed:
    sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2Test.java
Modified:
    sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrModifiablePropertyMapTest.java
    sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java

Modified: sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrModifiablePropertyMapTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrModifiablePropertyMapTest.java?rev=883721&r1=883720&r2=883721&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrModifiablePropertyMapTest.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrModifiablePropertyMapTest.java
Tue Nov 24 15:01:19 2009
@@ -127,6 +127,7 @@
         pvm.put("something", strings);
 
         // check if we get the list again
+        @SuppressWarnings("unchecked")
         final List<String> strings2 = (List<String>) pvm.get("something");
         assertEquals(strings, strings2);
 
@@ -134,6 +135,7 @@
 
         final PersistableValueMap pvm2 = new JcrModifiablePropertyMap(this.rootNode);
         // check if we get the list again
+        @SuppressWarnings("unchecked")
         final List<String> strings3 = (List<String>) pvm2.get("something", Serializable.class);
         assertEquals(strings, strings3);
 

Copied: sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java
(from r881350, sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2Test.java)
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java?p2=sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java&p1=sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2Test.java&r1=881350&r2=883721&rev=883721&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2Test.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java
Tue Nov 24 15:01:19 2009
@@ -47,7 +47,7 @@
 import org.apache.sling.jcr.resource.internal.helper.RedirectResource;
 import org.apache.sling.jcr.resource.internal.helper.starresource.StarResource;
 
-public class JcrResourceResolver2Test extends RepositoryTestBase {
+public class JcrResourceResolverTest extends RepositoryTestBase {
 
     private String rootPath;
 
@@ -263,7 +263,7 @@
         HttpServletRequest request = new ResourceResolverTestRequest("https",
             null, -1, rootPath);
         Node localhost443 = mapRoot.getNode("map/https/localhost.443");
-        localhost443.setProperty(JcrResourceResolver2.PROP_REDIRECT_EXTERNAL,
+        localhost443.setProperty(JcrResourceResolver.PROP_REDIRECT_EXTERNAL,
             "http://localhost");
         session.save();
 
@@ -282,7 +282,7 @@
         HttpServletRequest request = new ResourceResolverTestRequest("https",
             null, -1, rootPath);
         Node localhost443 = mapRoot.getNode("map/https/localhost.443");
-        localhost443.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        localhost443.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "http://localhost");
         session.save();
 
@@ -304,9 +304,9 @@
         Node localhost443 = mapRoot.getNode("map/https/localhost.443");
         Node toContent = localhost443.addNode("_playground_designground_",
             "sling:Mapping");
-        toContent.setProperty(JcrResourceResolver2.PROP_REG_EXP,
+        toContent.setProperty(JcrResourceResolver.PROP_REG_EXP,
             "(playground|designground)");
-        toContent.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        toContent.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/content/$1");
         session.save();
 
@@ -330,8 +330,8 @@
             null, -1, rootPath);
         Node localhost443 = mapRoot.getNode("map/https/localhost.443");
         Node toContent = localhost443.addNode("virtual", "sling:Mapping");
-        toContent.setProperty(JcrResourceResolver2.PROP_REG_EXP, "virtual$");
-        toContent.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        toContent.setProperty(JcrResourceResolver.PROP_REG_EXP, "virtual$");
+        toContent.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/content/virtual.html");
         session.save();
 
@@ -365,13 +365,13 @@
 
         // map anything
         Node localhost443 = mapRoot.getNode("map/https/localhost.443");
-        localhost443.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        localhost443.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/content");
 
         // map only ../virtual
         Node toContent = localhost443.addNode("virtual", "sling:Mapping");
-        toContent.setProperty(JcrResourceResolver2.PROP_REG_EXP, "virtual$");
-        toContent.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        toContent.setProperty(JcrResourceResolver.PROP_REG_EXP, "virtual$");
+        toContent.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/content/virtual.html");
         session.save();
 
@@ -395,7 +395,7 @@
             "virtual.host.com", -1, rootPath);
         Node virtualhost80 = mapRoot.getNode("map/http").addNode(
             "virtual.host.com.80", "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/content/virtual");
         session.save();
 
@@ -432,11 +432,11 @@
 
         Node virtualhost80 = mapRoot.getNode("map/http").addNode(
             hostDE + ".80", "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             contentDE);
         virtualhost80 = mapRoot.getNode("map/http").addNode(hostEN + ".80",
             "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             contentEN);
         session.save();
 
@@ -502,11 +502,11 @@
 
         Node virtualhost80 = mapRoot.getNode("map/http").addNode(
             hostDE + ".80", "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/");
         virtualhost80 = mapRoot.getNode("map/http").addNode(hostEN + ".80",
             "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/");
         session.save();
 
@@ -597,7 +597,7 @@
             "virtual.host.com", 8080, rootPath);
         Node virtualhost80 = mapRoot.getNode("map/http").addNode(
             "virtual.host.com.8080", "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/content/virtual");
         session.save();
 
@@ -629,7 +629,7 @@
             "virtual.host.com", 8080, rootPath);
         Node virtualhost80 = mapRoot.getNode("map/http").addNode(
             "virtual.host.com.8080", "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/");
         session.save();
 
@@ -661,7 +661,7 @@
             "virtual.host.com", -1, rootPath);
         Node virtualhost443 = mapRoot.getNode("map/https").addNode(
             "virtual.host.com.443", "sling:Mapping");
-        virtualhost443.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost443.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             "/content/virtual");
         session.save();
 
@@ -693,7 +693,7 @@
         Node virtualhost4443 = mapRoot.getNode("map/https").addNode(
             "virtual.host.com.4443", "sling:Mapping");
         virtualhost4443.setProperty(
-            JcrResourceResolver2.PROP_REDIRECT_INTERNAL, "/content/virtual");
+            JcrResourceResolver.PROP_REDIRECT_INTERNAL, "/content/virtual");
         session.save();
 
         Thread.sleep(1000L);
@@ -722,7 +722,7 @@
     public void testResolveResourceAlias() throws Exception {
         // define an alias for the rootPath
         String alias = "testAlias";
-        rootNode.setProperty(JcrResourceResolver2.PROP_ALIAS, alias);
+        rootNode.setProperty(JcrResourceResolver.PROP_ALIAS, alias);
         session.save();
 
         String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath)
@@ -762,7 +762,7 @@
         // define an alias for the rootPath in the jcr:content child node
         String alias = "testAlias";
         Node content = rootNode.addNode("jcr:content", "nt:unstructured");
-        content.setProperty(JcrResourceResolver2.PROP_ALIAS, alias);
+        content.setProperty(JcrResourceResolver.PROP_ALIAS, alias);
         session.save();
 
         String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath)
@@ -907,7 +907,7 @@
 
         Node virtualhost80 = mapRoot.getNode("map/http").addNode(
             mapHost + ".80", "sling:Mapping");
-        virtualhost80.setProperty(JcrResourceResolver2.PROP_REDIRECT_INTERNAL,
+        virtualhost80.setProperty(JcrResourceResolver.PROP_REDIRECT_INTERNAL,
             mapRootPath);
         session.save();
 
@@ -1274,7 +1274,7 @@
     public void test_resolve_with_sling_alias() throws Exception {
 
         Node child = rootNode.addNode("child");
-        child.setProperty(JcrResourceResolver2.PROP_ALIAS, "kind");
+        child.setProperty(JcrResourceResolver.PROP_ALIAS, "kind");
         session.save();
 
         // expect kind due to alias and no parent due to mapping
@@ -1296,7 +1296,7 @@
 
         // second level alias
         Node grandchild = child.addNode("grandchild");
-        grandchild.setProperty(JcrResourceResolver2.PROP_ALIAS, "enkel");
+        grandchild.setProperty(JcrResourceResolver.PROP_ALIAS, "enkel");
         session.save();
 
         // expect kind/enkel due to alias and no parent due to mapping
@@ -1320,7 +1320,7 @@
         final String selExt = ".html";
 
         Node child = rootNode.addNode("child");
-        child.setProperty(JcrResourceResolver2.PROP_ALIAS, "kind");
+        child.setProperty(JcrResourceResolver.PROP_ALIAS, "kind");
         session.save();
 
         // expect kind due to alias and no parent due to mapping
@@ -1341,7 +1341,7 @@
 
         // second level alias
         Node grandchild = child.addNode("grandchild");
-        grandchild.setProperty(JcrResourceResolver2.PROP_ALIAS, "enkel");
+        grandchild.setProperty(JcrResourceResolver.PROP_ALIAS, "enkel");
         session.save();
 
         // expect kind/enkel due to alias and no parent due to mapping
@@ -1365,7 +1365,7 @@
         final String selExt = ".sel1.sel2.html";
 
         Node child = rootNode.addNode("child");
-        child.setProperty(JcrResourceResolver2.PROP_ALIAS, "kind");
+        child.setProperty(JcrResourceResolver.PROP_ALIAS, "kind");
         session.save();
 
         // expect kind due to alias and no parent due to mapping
@@ -1385,7 +1385,7 @@
 
         // second level alias
         Node grandchild = child.addNode("grandchild");
-        grandchild.setProperty(JcrResourceResolver2.PROP_ALIAS, "enkel");
+        grandchild.setProperty(JcrResourceResolver.PROP_ALIAS, "enkel");
         session.save();
 
         // expect kind/enkel due to alias and no parent due to mapping
@@ -1409,7 +1409,7 @@
         final String selExt = ".html/some/suffx.pdf";
 
         Node child = rootNode.addNode("child");
-        child.setProperty(JcrResourceResolver2.PROP_ALIAS, "kind");
+        child.setProperty(JcrResourceResolver.PROP_ALIAS, "kind");
         session.save();
 
         // expect kind due to alias and no parent due to mapping

Propchange: sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java?rev=883721&r1=883720&r2=883721&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/test/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntryTest.java
Tue Nov 24 15:01:19 2009
@@ -35,14 +35,14 @@
 
     private ResourceProvider rootProvider;
 
-    private ResourceProviderEntry2 root;
+    private ResourceProviderEntry root;
 
     @Override
     protected void setUp() throws Exception {
         super.setUp();
 
         rootProvider = new TestResourceProvider("/");
-        root = new ResourceProviderEntry2("/", new ResourceProvider[]{ rootProvider});
+        root = new ResourceProviderEntry("/", new ResourceProvider[]{ rootProvider});
     }
 
     @Override
@@ -64,7 +64,7 @@
         String firstPath = "/rootel";
         ResourceProvider first = new TestResourceProvider(firstPath);
         root.addResourceProvider(firstPath, first, null);
-        
+
 
         assertEquals(root, root.getResource(null, "/"));
         assertEquals(first, root.getResource(null, "/rootel"));
@@ -90,7 +90,7 @@
         root.addResourceProvider(secondPath, second, null);
         root.addResourceProvider(thirdPath, third, null);
 
-        
+
 
         assertEquals(rootProvider, root.getResource(null, "/"));
         assertEquals(first, root.getResource(null, "/rootel"));
@@ -164,7 +164,7 @@
         assertEquals(resProvider, res.getResourceResolver());
     }
 
-    protected void assertEquals(ResourceProviderEntry2 resProviderEntry,
+    protected void assertEquals(ResourceProviderEntry resProviderEntry,
             Resource res) {
         ResourceProvider[] resourceProviders = resProviderEntry.getResourceProviders();
         for ( ResourceProvider rp : resourceProviders ) {
@@ -196,10 +196,6 @@
             return new TestResource(path, this);
         }
 
-        public String[] getRoots() {
-            return roots;
-        }
-
         public Iterator<Resource> listChildren(Resource parent) {
             return null;
         }
@@ -224,7 +220,7 @@
         public String map(HttpServletRequest request, String resourcePath) {
             return null;
         }
-        
+
         public String map(String resourcePath) {
             return null;
         }
@@ -237,7 +233,7 @@
         public Resource resolve(HttpServletRequest request, String absPath) {
             return null;
         }
-        
+
         public Resource resolve(HttpServletRequest request) {
             return null;
         }
@@ -249,7 +245,7 @@
         public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
             return null;
         }
-        
+
         /**
          * {@inheritDoc}
          * @see java.lang.Object#toString()
@@ -291,7 +287,7 @@
         public String getResourceSuperType() {
             return null;
         }
-        
+
         public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
             return null;
         }



Mime
View raw message