Rob Godfrey created QPID-6550:
---------------------------------
Summary: [Java Broker] BrokerStoreUpgraderAndRecoverer incorrectly
adds vhostaliases to non-AMQP ports which do not have protocols
Key: QPID-6550
URL: https://issues.apache.org/jira/browse/QPID-6550
Project: Qpid
Issue Type: Bug
Components: Java Broker
Reporter: Rob Godfrey
Fix For: 6.0 [Java]
The BrokerStoreUpgraderAndRecoverer upgrade from model version 2.0 to 3.0 has
incorrect logic in identifying AMQP port configurations:
{code}
private boolean isAmqpPort(final Map<String, Object> attributes)
{
Object type = attributes.get(ConfiguredObject.TYPE);
Object protocols = attributes.get(Port.PROTOCOLS);
String protocolString = protocols == null ? null :
protocols.toString();
return "AMQP".equals(type)
|| protocolString == null
|| !protocolString.matches(".*\\w.*")
|| protocolString.contains("AMQP");
}
{code}
will incorrectly identify ports with a non-AMQP type as being AMQP ports.
This should be corrected to something like:
{code}
private boolean isAmqpPort(final Map<String, Object> attributes)
{
Object type = attributes.get(ConfiguredObject.TYPE);
Object protocols = attributes.get(Port.PROTOCOLS);
String protocolString = protocols == null ? null :
protocols.toString();
return "AMQP".equals(type)
|| ((type == null || "".equals(type.toString().trim()))
&& (protocolString == null
|| !protocolString.matches(".*\\w.*")
|| protocolString.contains("AMQP")));
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]