[
https://issues.apache.org/jira/browse/AMQ-4433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13620915#comment-13620915
]
Timothy Bish commented on AMQ-4433:
-----------------------------------
Patches are good but without a test case to validate them they cannot be
protected into the future. Recommend you work out some unit tests for these
scenarios.
> Socket parameters are not validated
> -----------------------------------
>
> Key: AMQ-4433
> URL: https://issues.apache.org/jira/browse/AMQ-4433
> Project: ActiveMQ
> Issue Type: Bug
> Reporter: Christoffer Sawicki
> Priority: Minor
> Attachments: 0001-Validate-socket-parameters.patch,
> 0002-Validate-connector-parameters.patch,
> 0003-Validate-transport-parameters.patch
>
>
> Connect parameters are validated in every transport factory with a statement
> like this:
> {noformat}
> if (!options.isEmpty()) {
> throw new IllegalArgumentException("Invalid connect parameters: " +
> options);
> }
> {noformat}
> Socket parameters (i.e. connect parameters prefixed with {{socket.}}) are
> however never validated.
> They are put away at
> {noformat}
> TcpTransportFactory.compositeConfigure(Transport, WireFormat, Map) line: 85
> {noformat}
> and then set at
> {noformat}
> TcpTransport.initialiseSocket(Socket) line: 428
> {noformat}
> where there is no check that {{socketOptions}} is empty after the call.
> I've attached a patch (#1) that rectifies this.
> Bonus: I found similar issues in the transport classes. See patch #2 and #3.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira