Skip to content

Commit

Permalink
Merge pull request #366 from codeconsole/sitemesh2.4.4
Browse files Browse the repository at this point in the history
Update SiteMesh 2.4.4
  • Loading branch information
puneetbehl authored Aug 25, 2023
2 parents 7def2c7 + c8f51a4 commit ae31a2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ controllersRef=https://docs.grails.org/latest/ref/Controllers
commandLineRef=https://docs.grails.org/latest/ref/Command%20Line
grailsDocsVersion=5.0.2
testingSupportVersion=3.0.0
sitemeshVersion=2.4.3
sitemeshVersion=2.4.4
junit-jupiter.version=5.8.0

org.gradle.caching=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.grails.plugins.web.taglib

import com.opensymphony.module.sitemesh.*
import com.opensymphony.module.sitemesh.parser.AbstractHTMLPage
import grails.artefact.TagLibrary
import grails.core.GrailsApplication
import grails.core.support.GrailsApplicationAware
Expand Down Expand Up @@ -121,7 +120,7 @@ class RenderTagLib implements RequestConstants, TagLibrary, GrailsApplicationAwa
content = bodyClosure()
}
if (content instanceof StreamCharBuffer) {
gspSiteMeshPage.setPageBuffer(content)
gspSiteMeshPage.setPageBuffer((StreamCharBuffer) content)
gspSiteMeshPage.setUsed(isSitemeshPreprocessMode())
}
else if (content != null) {
Expand Down Expand Up @@ -284,7 +283,7 @@ class RenderTagLib implements RequestConstants, TagLibrary, GrailsApplicationAwa
def propertyValue = null
if (htmlPage instanceof GSPSitemeshPage) {
// check if there is an component content buffer
propertyValue = htmlPage.getContentBuffer(propertyName)
propertyValue = ((GSPSitemeshPage) htmlPage).getContentBuffer(propertyName)
}

if (!propertyValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,13 @@
*/
package org.grails.web.sitemesh;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.opensymphony.module.sitemesh.Decorator;
import com.opensymphony.sitemesh.Content;
import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext;
import com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator;
import com.opensymphony.sitemesh.webapp.decorator.NoDecorator;

/**
* Grails version of Sitemesh's NoDecorator
*
* original version always calls response.setContentLength which would require the calculation of
* resulting bytes. Calculation would be extra overhead.
*
* bug exists for OutputStream / byte version: http://jira.opensymphony.com/browse/SIM-196
* skip setting ContentLength because of that bug.
*
* @author Lari Hotari, Sagire Software Oy
*/
public class GrailsNoDecorator extends NoDecorator implements Decorator {
Expand Down

0 comments on commit ae31a2c

Please sign in to comment.