CacheControl cacheControl = map.get(portletWindowId);
if(cacheControl == null) {
cacheControl = new CacheControlImpl();
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpRequest, portletWindowId);
if(portletWindow == null) {
<BUG>log.warn("portletWindowRegistry returned null portletWindow for " + portletWindowId + ", returning default cacheControl");
return cacheControl;</BUG>
}
final IPortletEntityId entityId = portletWindow.getPortletEntityId();
final IPortletEntity entity = this.portletEntityRegistry.getPortletEntity(httpRequest, entityId);

CacheControl cacheControl = map.get(portletWindowId);
if(cacheControl == null) {
cacheControl = new CacheControlImpl();
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpRequest, portletWindowId);
if(portletWindow == null) {
logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl", portletWindowId);
return cacheControl;
}
final IPortletEntityId entityId = portletWindow.getPortletEntityId();
final IPortletEntity entity = this.portletEntityRegistry.getPortletEntity(httpRequest, entityId);
