Bug #101

MsgErrorEncoder class throws NPE

Added by achristian over 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:07/13/2011
Priority:NormalDue date:
Assignee:achristian% Done:

100%

Category:ProtocolEstimated time:0.50 h
Target version:1.1.3

Description

Scenario: Client requests a list from server, which contains objects, for which the client does not have the implementation.

Client tries to send an error message to server. But as there is no remote-object available, there's no remote object name, and so the encoder will fail with an NPE.

Fix in MsgErrorEncoder#encodeBody()

        String remoteObjectName = message.getRemoteObjectName();
        if (remoteObjectName==null) {
            remoteObjectName="<NoRemoteObjectNameAvailable>";
        }
        String errorMsg = message.getErrorMessage();
        if (errorMsg==null) {
            errorMsg="<NoErrorMsgAvailable>";
        }
        Throwable throwable = message.getThrowable();
        if (throwable==null) {
            throwable = new Throwable("NoThrowableAvailable");
        }

History

#1 Updated by achristian over 7 years ago

  • Target version changed from 1.2.0 to 1.1.3

#2 Updated by achristian about 7 years ago

  • Status changed from New to Resolved

fixed

#3 Updated by achristian almost 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

No problems foudn so far. Closed.

Also available in: Atom PDF