Author: mageshbk(a)jboss.com
Date: 2009-05-23 21:33:15 -0400 (Sat, 23 May 2009)
New Revision: 13404
Modified:
modules/portlet/branches/JBP_PORTLET_2_0_5_JBEPP-73/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java
Log:
[JBEPP-73] - Fixed jsr168 ext-*cache test case failures
Modified:
modules/portlet/branches/JBP_PORTLET_2_0_5_JBEPP-73/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java
===================================================================
---
modules/portlet/branches/JBP_PORTLET_2_0_5_JBEPP-73/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java 2009-05-22
13:44:25 UTC (rev 13403)
+++
modules/portlet/branches/JBP_PORTLET_2_0_5_JBEPP-73/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/MimeResponseImpl.java 2009-05-24
01:33:15 UTC (rev 13404)
@@ -217,7 +217,7 @@
return ResourceURLImpl.createResourceURL(invocation, preq);
}
- public void addProperty(String key, String value) throws IllegalArgumentException
+ private void setCache(String key, String value)
{
if (MimeResponse.EXPIRATION_CACHE.equals(key))
{
@@ -250,12 +250,37 @@
getCacheControl().setUseCachedContent(true);
}
}
+ }
+
+ public void addProperty(String key, String value) throws IllegalArgumentException
+ {
+ if (MimeResponse.EXPIRATION_CACHE.equals(key)
+ || MimeResponse.ETAG.equals(key)
+ || MimeResponse.USE_CACHED_CONTENT.equals(key))
+ {
+ setCache(key, value);
+ }
else
{
super.addProperty(key, value);
}
}
+
+ public void setProperty(String key, String value) throws IllegalArgumentException
+ {
+ if (MimeResponse.EXPIRATION_CACHE.equals(key)
+ || MimeResponse.ETAG.equals(key)
+ || MimeResponse.USE_CACHED_CONTENT.equals(key))
+ {
+ setCache(key, value);
+ }
+ else
+ {
+ super.setProperty(key, value);
+ }
+ }
+
public CacheControl getCacheControl()
{
if (cacheControl == null)
Show replies by date