(0000790)
koreth
01-26-06 14:51
|
Here's the patch for my change -- I am *not* suggesting this be incorporated into the main release, but this may save someone else some time if they look at this bug report wondering how to do the same thing.
--- modules/resin/src/com/caucho/jsp/AbstractBodyContent.java- 2006-01-26 14:17:17.959091586 -0800
+++ modules/resin/src/com/caucho/jsp/AbstractBodyContent.java 2006-01-26 14:17:49.934781032 -0800
@@ -49,7 +49,6 @@
abstract class AbstractBodyContent extends AbstractJspWriter {
private static final char []_trueChars = "true".toCharArray();
private static final char []_falseChars = "false".toCharArray();
- private static final char []_nullChars = "null".toCharArray();
private final char []_tempCharBuffer = new char[256];
@@ -215,9 +214,7 @@
*/
final public void print(String s) throws IOException
{
- if (s == null)
- write(_nullChars, 0, _nullChars.length);
- else
+ if (s != null)
write(s, 0, s.length());
}
@@ -226,9 +223,7 @@
*/
final public void print(Object v) throws IOException
{
- if (v == null)
- write(_nullChars, 0, _nullChars.length);
- else {
+ if (v != null) {
String s = v.toString();
write(s, 0, s.length());
@@ -329,9 +324,7 @@
*/
final public void println(String s) throws IOException
{
- if (s == null)
- write(_nullChars, 0, _nullChars.length);
- else
+ if (s != null)
write(s, 0, s.length());
println();
@@ -342,9 +335,7 @@
*/
final public void println(Object v) throws IOException
{
- if (v == null)
- write(_nullChars, 0, _nullChars.length);
- else {
+ if (v != null) {
String s = String.valueOf(v);
write(s, 0, s.length()); |