Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005837 [Resin] minor random 12-08-14 02:29 03-01-15 10:47
Reporter samadams View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.41
Summary 0005837: NullPointerException when closing WebSocketPrintWriter
Description I've seen the following exception when calling close() on WebSocketPrintWriter:

Exception in thread "pool-166-thread-48" java.lang.NullPointerException
at com.caucho.remote.websocket.WebSocketWriter.complete(WebSocketWriter.java:251)
at com.caucho.remote.websocket.WebSocketWriter.close(WebSocketWriter.java:200)
at com.caucho.remote.websocket.WebSocketPrintWriter.close(WebSocketPrintWriter.java:56)

Code snippet:

    public void publishMessage(final WebSocketContext context, final String message) throws IOException {

        PrintWriter writer = null;
        try {
            writer = context.startTextMessage();
            writer.print(message);
        } finally {
            if (writer != null) {
                writer.close();
            }
        }
    }

Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
12-08-14 02:29 samadams New Issue
03-01-15 10:47 ferg Assigned To  => ferg
03-01-15 10:47 ferg Status new => closed
03-01-15 10:47 ferg Resolution open => fixed
03-01-15 10:47 ferg Fixed in Version  => 4.0.44
03-01-15 10:47 ferg Description Updated
03-01-15 10:47 ferg Additional Information Updated


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker