https://issues.apache.org/bugzilla/show_bug.cgi?id=57118

            Bug ID: 57118
           Summary: Throw EncodeException from
                    RemoteEndpoint.Basic.sendObject()
           Product: Tomcat 8
           Version: 8.0.14
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: knst.koli...@gmail.com

(Noted when updating documentation in r1632965)

The method javax.websocket.RemoteEndpoint.Basic.sendObject(Object) is expected
to throw EncodeException if there is no suitable encoder configured for the
object type.

The actual implementation in
org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendObject(Object) does not
throw that exception, because the method that is called there does not throw
it. It is not even declares a "throws" for it, and it is a checked exception.

My understanding is that the exception is passed to a competition handler, but
it is not properly unwrapped. An IOException is thrown instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to