File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
src/web/org/codehaus/groovy/grails/web/taglib Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1818import java .io .StringWriter ;
1919
2020/**
21- * A temporary writer used by GSP to write to a StringWriter and later retrieve the value
21+ * A temporary writer used by GSP to write to a StringWriter and later retrieve the value. It also converts
22+ * nulls into blank strings.
2223 *
2324 * @author Graeme Rocher
24- * @since 0.4
25+ * @since 0.5
26+ *
2527 * <p/>
2628 * Created: Apr 19, 2007
2729 * Time: 5:49:46 PM
@@ -50,6 +52,20 @@ public void print(Object o) {
5052 super .print (o );
5153 }
5254
55+ public void write (String s ) {
56+ if (s == null ) s = BLANK_STRING ;
57+ super .write (s );
58+ }
59+
60+ public void println (String s ) {
61+ if (s == null ) s = BLANK_STRING ;
62+ super .println (s );
63+ }
64+
65+ public void println (Object o ) {
66+ if (o ==null )o = BLANK_STRING ;
67+ super .println (o );
68+ }
5369 public String getValue () {
5470 return stringWriter .toString ();
5571 }
You can’t perform that action at this time.
0 commit comments