Skip to content
Browse files

Small efficiency improvements to MailerJob.

  • Loading branch information...
1 parent 3b7bc34 commit b1e5c010e134d0fe613ef8b1253fe5944a334bee @pledbrook pledbrook committed Dec 6, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 grails-app/jobs/MailerJob.groovy
View
5 grails-app/jobs/MailerJob.groovy
@@ -42,7 +42,7 @@ class MailerJob {
def pageClass = classLoader.loadClass(pageUpdate.className)
def content = pageClass.findByTitle(pageUpdate.title)
- def text = new StringBuffer()
+ def text = new StringBuilder()
def titleUrlEscaped = pageUpdate.title.encodeAsURL()
def url = "http://grails.org/${titleUrlEscaped}"
def myTitle = pageUpdate.title
@@ -74,14 +74,15 @@ class MailerJob {
text << "Edited by <b>${version.author?.login}</b>. <a href=\"http://grails.org/previous/${titleUrlEscaped}/${version.number}\">View change</a> <br><br>"
text << "</div>"
// text << engine.render(content.body, context)
+ text = text.toString()
for (email in emails) {
mailService?.sendMail {
title "Grails > ${myTitle}"
from "wiki@grails.org"
replyTo "wiki@grails.org"
to email
- html text.toString()
+ html text
}
}
}

0 comments on commit b1e5c01

Please sign in to comment.
Something went wrong with that request. Please try again.