From dev-return-63941-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Fri Feb 2 11:23:48 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id AB2EA180608 for ; Fri, 2 Feb 2018 11:23:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9AF74160C49; Fri, 2 Feb 2018 10:23:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E154D160C41 for ; Fri, 2 Feb 2018 11:23:47 +0100 (CET) Received: (qmail 34772 invoked by uid 500); 2 Feb 2018 10:23:47 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 34758 invoked by uid 99); 2 Feb 2018 10:23:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2018 10:23:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 390F5DFC27; Fri, 2 Feb 2018 10:23:46 +0000 (UTC) From: franz1981 To: dev@activemq.apache.org Reply-To: dev@activemq.apache.org References: In-Reply-To: Subject: [GitHub] activemq-artemis pull request #1793: ARTEMIS-1498: Openwire internal headers... Content-Type: text/plain Message-Id: <20180202102346.390F5DFC27@git1-us-west.apache.org> Date: Fri, 2 Feb 2018 10:23:46 +0000 (UTC) Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1793#discussion_r165608418 --- Diff: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java --- @@ -576,308 +334,54 @@ private static ActiveMQMessage toAMQMessage(MessageReference reference, amqMsg.setExpiration(coreMessage.getExpiration()); amqMsg.setPriority(coreMessage.getPriority()); amqMsg.setTimestamp(coreMessage.getTimestamp()); - - Long brokerInTime = (Long) coreMessage.getObjectProperty(AMQ_MSG_BROKER_IN_TIME); - if (brokerInTime == null) { - brokerInTime = 0L; - } - amqMsg.setBrokerInTime(brokerInTime); - amqMsg.setCompressed(isCompressed); - //we need check null because messages may come from other clients - //and those amq specific attribute may not be set. - Long arrival = (Long) coreMessage.getObjectProperty(AMQ_MSG_ARRIVAL); - if (arrival == null) { - //messages from other sources (like core client) may not set this prop - arrival = 0L; - } - amqMsg.setArrival(arrival); - - final String brokerPath = (String) coreMessage.getObjectProperty(AMQ_MSG_BROKER_PATH); - if (brokerPath != null && !brokerPath.isEmpty()) { - setAMQMsgBrokerPath(amqMsg, brokerPath); - } - - final String clusterPath = (String) coreMessage.getObjectProperty(AMQ_MSG_CLUSTER); - if (clusterPath != null && !clusterPath.isEmpty()) { - setAMQMsgClusterPath(amqMsg, clusterPath); - } - - Integer commandId = (Integer) coreMessage.getObjectProperty(AMQ_MSG_COMMAND_ID); - if (commandId == null) { - commandId = -1; - } - amqMsg.setCommandId(commandId); - final SimpleString corrId = (SimpleString) coreMessage.getObjectProperty(JMS_CORRELATION_ID_PROPERTY); if (corrId != null) { amqMsg.setCorrelationId(corrId.toString()); } - final byte[] dsBytes = (byte[]) coreMessage.getObjectProperty(AMQ_MSG_DATASTRUCTURE); - if (dsBytes != null) { - setAMQMsgDataStructure(amqMsg, marshaller, dsBytes); - } - final ActiveMQDestination actualDestination = consumer.getOpenwireDestination(); - amqMsg.setDestination(OpenWireUtil.toAMQAddress(coreMessage, actualDestination)); - - final Object value = coreMessage.getGroupID(); --- End diff -- It is `SimpleString` to could be used the exact type instead of `Object` ---