From dev-return-66824-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Tue Aug 14 18:22:08 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C9FC5180654 for ; Tue, 14 Aug 2018 18:22:07 +0200 (CEST) Received: (qmail 61696 invoked by uid 500); 14 Aug 2018 16:22:06 -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 61685 invoked by uid 99); 14 Aug 2018 16:22:06 -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; Tue, 14 Aug 2018 16:22:06 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 829E0DFAE2; Tue, 14 Aug 2018 16:22:05 +0000 (UTC) From: clebertsuconic To: dev@activemq.apache.org Reply-To: dev@activemq.apache.org References: In-Reply-To: Subject: [GitHub] activemq-artemis pull request #2249: ARTEMIS-2023 Fix NPE Content-Type: text/plain Message-Id: <20180814162205.829E0DFAE2@git1-us-west.apache.org> Date: Tue, 14 Aug 2018 16:22:05 +0000 (UTC) Github user clebertsuconic commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2249#discussion_r210016477 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/StoreConfigTest.java --- @@ -289,6 +294,107 @@ public void testCreateQueue() throws Exception { jmsServer.stop(); } + @Test + public void testCompatibilityWith260() { + List transportConfigurations = new ArrayList<>(); + transportConfigurations.add("tst"); + ConnectionFactoryConfigurationImpl configuration = (ConnectionFactoryConfigurationImpl) new ConnectionFactoryConfigurationImpl(); + configuration.setName("np").setConnectorNames(transportConfigurations); + + ByteBuffer buffer = ByteBuffer.allocate(configuration.getEncodeSize()); + ActiveMQBuffer activeMQBuffer = new ChannelBufferWrapper(Unpooled.wrappedBuffer(buffer)); + activeMQBuffer.clear(); + encodeVersion260(activeMQBuffer, configuration); + configuration.decode(activeMQBuffer); + } + + public void encodeVersion260(final ActiveMQBuffer buffer, final ConnectionFactoryConfigurationImpl connectionFactoryConfiguration) { --- End diff -- leave it with me.. I'm writing a test.. and I will amend yours manually. ---