[ https://issues.apache.org/jira/browse/QPID-6550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rob Godfrey resolved QPID-6550. ------------------------------- Resolution: Fixed > [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 > Assignee: 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: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org