Skip to content

Consistently check Status.getStackDump() is non-empty in exception message construction #117

@joeshannon

Description

@joeshannon

The Status (org.epics.pvdata.pv.Status) interface defines getStackDump which returns a string.

This is used in several places for logging purposes or to construct other exceptions.

When working with RPCClientImpl we are seeing that the RPCRequestException contains a superfluous ", cause:\n". This is because the string from getStackDump() is non-null but an empty string but only non-null is considered in RPCClientImpl. In other places the string is already checked to be empty. Here is a summary of the callers:

  • org.epics.pvaccess.server.impl.remote.tcp.BlockingServerTCPTransport.authenticationCompleted(Status)
  • org.epics.pvaccess.server.impl.remote.tcp.NonBlockingServerTCPTransport.authenticationCompleted(Status)
  • org.epics.pvaccess.server.impl.remote.rpc.ServerRPCService.OpChannels.execute()
  • org.epics.pvaccess.client.impl.remote.handlers.CreateChannelHandler.handleResponse(InetSocketAddress, Transport, byte, byte, int, ByteBuffer)
  • org.epics.pvaccess.client.rpc.RPCClientImpl.request(PVStructure, double)
  • org.epics.pvaccess.impl.remote.tcp.BlockingTCPTransport.verified(Status)
  • org.epics.pvaccess.impl.remote.tcp.NonBlockingTCPTransport.verified(Status)

All apart from RPCClientImpl and ServerRPCService already check this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions