GRAILS-11513 improve previous fix: use optimized way for writing CharSequences to Writer
Merge branch '2.3.x' into 2.4.x