[
https://issues.apache.org/jira/browse/QPID-7741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969142#comment-15969142
]
Rob Godfrey commented on QPID-7741:
-----------------------------------
Are you planning to make any changes to cope with the fact that the decoders
silently ignore the wrong type being used for fields (the value is left at
null, and the code passes through a // TODO :-) )?
In terms of the approach, I can't help thinking that the validators should be
built at compile time rather than runtime... but really what that points to is
that the whole described type constructors stuff just needs to be rewritten
(preferably avoiding having to decode into an intermediate list)
> [Java Broker] In AMQP 1.0 gracefully handle non-compliant performatives
> -----------------------------------------------------------------------
>
> Key: QPID-7741
> URL: https://issues.apache.org/jira/browse/QPID-7741
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Reporter: Lorenz Quack
> Fix For: qpid-java-broker-7.0.0
>
>
> Currently the amqp 1.0 codec does not enforce mandatory fields. Often this
> causes problems later in the code like {{NullPointerExceptions}}
> One example is when sending an empty Begin without any of the mandatory
> fields:
> {noformat}
> 2017-04-07 14:46:55,804 DEBUG [IO-/127.0.0.1:39032] (o.a.q.s.p.frame) -
> RECV[/127.0.0.1:39032|37] : Begin{}
> 2017-04-07 14:46:55,805 WARN [IO-/127.0.0.1:39032]
> (o.a.q.s.p.v.f.FrameHandler) - Unexpected exception handling frame
> java.lang.NullPointerException: null
> at
> org.apache.qpid.server.protocol.v1_0.Session_1_0.<init>(Session_1_0.java:182)
> at
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveBegin(AMQPConnection_1_0Impl.java:622)
> at
> org.apache.qpid.server.protocol.v1_0.type.transport.Begin.invoke(Begin.java:224)
> at
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:318)
> at
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:167)
> at
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl$9.run(AMQPConnection_1_0Impl.java:1195)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1168)
> at
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:129)
> at
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:592)
> at
> org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58)
> at
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:482)
> at
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:269)
> at
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:124)
> at
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
> at
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
> at
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
> at
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> 2017-04-07 14:46:55,808 DEBUG [IO-/127.0.0.1:39032] (o.a.q.s.p.frame) -
> SEND[/127.0.0.1:39032|0] :
> Close{error=Error{condition=connection-forced,description=java.lang.NullPointerException}}
> {noformat}
> The correct behaviour would be to close the connection with a {{decode-error}}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]