Fix NullPointerException in writeln() introduced in previous commit.
This commit is contained in:
parent
2014f13cfd
commit
3be7e4db54
1 changed files with 7 additions and 1 deletions
|
@ -246,7 +246,13 @@ public final class ResponseTrans implements Externalizable {
|
||||||
* Utility function that appends a <br> to whatever is written.
|
* Utility function that appends a <br> to whatever is written.
|
||||||
*/
|
*/
|
||||||
public void writeln(Object what) {
|
public void writeln(Object what) {
|
||||||
this.write(what);
|
write(what);
|
||||||
|
|
||||||
|
// if what is null, buffer may still be uninitialized
|
||||||
|
if (buffer == null) {
|
||||||
|
buffer = new StringBuffer(INITIAL_BUFFER_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
buffer.append("<br />");
|
buffer.append("<br />");
|
||||||
buffer.append(newLine);
|
buffer.append(newLine);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue