incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r691241 - in /incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers: HtmlRendererServlet.java JsonRendererServlet.java PlainTextRendererServlet.java StreamRendererServlet.java
Date Tue, 02 Sep 2008 13:29:24 GMT
Author: cziegeler
Date: Tue Sep  2 06:29:22 2008
New Revision: 691241

URL: http://svn.apache.org/viewvc?rev=691241&view=rev
Log:
Handle synthetic resources and don't throw exception in this case.

Modified:
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/HtmlRendererServlet.java
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonRendererServlet.java
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/PlainTextRendererServlet.java
    incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/StreamRendererServlet.java

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/HtmlRendererServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/HtmlRendererServlet.java?rev=691241&r1=691240&r2=691241&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/HtmlRendererServlet.java
(original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/HtmlRendererServlet.java
Tue Sep  2 06:29:22 2008
@@ -47,7 +47,7 @@
             SlingHttpServletResponse resp) throws ServletException, IOException {
         final Resource r = req.getResource();
 
-        if (ResourceUtil.isSyntheticResource(r)) {
+        if (ResourceUtil.isNonExistingResource(r)) {
             throw new ResourceNotFoundException("No data to render.");
         }
 

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonRendererServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonRendererServlet.java?rev=691241&r1=691240&r2=691241&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonRendererServlet.java
(original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/JsonRendererServlet.java
Tue Sep  2 06:29:22 2008
@@ -61,7 +61,7 @@
             SlingHttpServletResponse resp) throws IOException {
         // Access and check our data
         final Resource r = req.getResource();
-        if (ResourceUtil.isSyntheticResource(r)) {
+        if (ResourceUtil.isNonExistingResource(r)) {
             throw new ResourceNotFoundException("No data to render.");
         }
 

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/PlainTextRendererServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/PlainTextRendererServlet.java?rev=691241&r1=691240&r2=691241&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/PlainTextRendererServlet.java
(original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/PlainTextRendererServlet.java
Tue Sep  2 06:29:22 2008
@@ -47,7 +47,7 @@
     protected void doGet(SlingHttpServletRequest req,
             SlingHttpServletResponse resp) throws ServletException, IOException {
         final Resource r = req.getResource();
-        if (ResourceUtil.isSyntheticResource(r)) {
+        if (ResourceUtil.isNonExistingResource(r)) {
             throw new ResourceNotFoundException("No data to render.");
         }
 

Modified: incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/StreamRendererServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/StreamRendererServlet.java?rev=691241&r1=691240&r2=691241&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/StreamRendererServlet.java
(original)
+++ incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/helpers/StreamRendererServlet.java
Tue Sep  2 06:29:22 2008
@@ -61,7 +61,7 @@
         }
 
         final Resource resource = request.getResource();
-        if (ResourceUtil.isSyntheticResource(resource)) {
+        if (ResourceUtil.isNonExistingResource(resource)) {
             throw new ResourceNotFoundException("No data to render.");
         }
 



Mime
View raw message