svn commit: r1225090 - in /cocoon/cocoon3/trunk/cocoon-rest/src: main/java/org/apache/cocoon/rest/controller/SpringRESTController.java test/java/org/apache/cocoon/rest/controller/SpringRESTControllerTest.java

[email protected]
Newsgroups gmane.text.xml.cocoon.cvs
Message-ID <[email protected]>
Author: thorsten
Date: Wed Dec 28 04:41:05 2011
New Revision: 1225090

URL: http://svn.apache.org/viewvc?rev=1225090&view=rev
Log:
Due to COCOON3-79 the sitemap parameters are not anymore only String but object, so droping test of type and removing test about illegeal invocation.


Modified:
    cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/SpringRESTController.java
    cocoon/cocoon3/trunk/cocoon-rest/src/test/java/org/apache/cocoon/rest/controller/SpringRESTControllerTest.java

Modified: cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/SpringRESTController.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/SpringRESTController.java?rev=1225090&r1=1225089&r2=1225090&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/SpringRESTController.java (original)
+++ cocoon/cocoon3/trunk/cocoon-rest/src/main/java/org/apache/cocoon/rest/controller/SpringRESTController.java Wed Dec 28 04:41:05 2011
@@ -378,13 +378,7 @@ public class SpringRESTController implem
         if (isBlank(name)) {
             name = field.getName();
         }
-
-        Class<?> fieldType = field.getType();
-        if (fieldType == String.class) {
-            field.set(controller, configuration.get(name));
-        } else {
-            throwIllegalFieldAnnotationException(SitemapParameter.class, field, String.class);
-        }
+        field.set(controller, configuration.get(name));
     }
 
     private static void throwIllegalFieldAnnotationException(Class<? extends Annotation> annotationClass,

Modified: cocoon/cocoon3/trunk/cocoon-rest/src/test/java/org/apache/cocoon/rest/controller/SpringRESTControllerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest/src/test/java/org/apache/cocoon/rest/controller/SpringRESTControllerTest.java?rev=1225090&r1=1225089&r2=1225090&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest/src/test/java/org/apache/cocoon/rest/controller/SpringRESTControllerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-rest/src/test/java/org/apache/cocoon/rest/controller/SpringRESTControllerTest.java Wed Dec 28 04:41:05 2011
@@ -141,22 +141,6 @@ public class SpringRESTControllerTest {
     }
 
     @Test
-    public void requestControllerWithIllegalSitemapParameterField() {
-        Map<String, Object> inputParameters = new HashMap<String, Object>();
-        HttpContextHelper.storeRequest(new MockHttpServletRequest(), inputParameters);
-        HttpContextHelper.storeResponse(new MockHttpServletResponse(), inputParameters);
-
-        Map<String, ? extends Object> configuration = Collections.emptyMap();
-
-        try {
-            this.springRESTController.setup("illegal-sitemap-parameter-field-controller", inputParameters,
-                    configuration);
-        } catch (InvocationException e) {
-            assertCauseIsIllegalFieldAnnotation(e);
-        }
-    }
-
-    @Test
     public void requestControllerWithIllegalBaseURLField() {
         Map<String, Object> inputParameters = new HashMap<String, Object>();
         HttpContextHelper.storeRequest(new MockHttpServletRequest(), inputParameters);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.