click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r962397 - /click/trunk/click/framework/src/org/apache/click/Partial.java
Date Fri, 09 Jul 2010 04:18:34 GMT
Author: sabob
Date: Fri Jul  9 04:18:34 2010
New Revision: 962397

URL: http://svn.apache.org/viewvc?rev=962397&view=rev
Log:
Partial.getContentType should default to TEXT

Modified:
    click/trunk/click/framework/src/org/apache/click/Partial.java

Modified: click/trunk/click/framework/src/org/apache/click/Partial.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/Partial.java?rev=962397&r1=962396&r2=962397&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/Partial.java (original)
+++ click/trunk/click/framework/src/org/apache/click/Partial.java Fri Jul  9 04:18:34 2010
@@ -342,12 +342,14 @@ public class Partial {
     }
 
     /**
-     * Return the partial content type. If no content type is specified it will
-     * default to {@value #TEXT}.
+     * Return the partial content type, default is {@value #TEXT}.
      *
      * @return the response content type
      */
     public String getContentType() {
+        if (contentType == null) {
+            contentType = TEXT;
+        }
         return contentType;
     }
 
@@ -559,9 +561,6 @@ public class Partial {
         }
 
         String contentType = getContentType();
-        if (contentType == null) {
-            contentType = TEXT;
-        }
 
         if (getCharacterEncoding() == null) {
 



Mime
View raw message