[1/2] activemq-artemis git commit: [ARTEMIS-1666] List of prepared transaction details returns Object.toString() instead of Json string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] activemq-artemis git commit: [ARTEMIS-1666] List of prepared transaction details returns Object.toString() instead of Json string

jbertram
Repository: activemq-artemis
Updated Branches:
  refs/heads/1.x a90adaed5 -> 846f36e98


[ARTEMIS-1666] List of prepared transaction details returns Object.toString() instead of Json string


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/de7f6de0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/de7f6de0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/de7f6de0

Branch: refs/heads/1.x
Commit: de7f6de0940680fe0814bcb8b7471c4cc5b4e696
Parents: a90adae
Author: Yeray Borges <[hidden email]>
Authored: Wed Feb 7 14:56:37 2018 +0000
Committer: Justin Bertram <[hidden email]>
Committed: Mon Feb 12 10:32:19 2018 -0600

----------------------------------------------------------------------
 .../activemq/artemis/jms/server/impl/JMSServerManagerImpl.java    | 2 +-
 .../integration/jms/server/management/JMSServerControlTest.java   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/de7f6de0/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 4c18741..5b0ca27 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -1367,7 +1367,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
          TransactionDetail detail = new JMSTransactionDetail(xid, tx, entry.getValue());
          txDetailListJson.add(detail.toJSON());
       }
-      return txDetailListJson.toString();
+      return txDetailListJson.build().toString();
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/de7f6de0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
index bfdd824..8cf7ae6 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java
@@ -860,7 +860,8 @@ public class JMSServerControlTest extends ManagementTestBase {
 
       ss.close();
 
-      control.listPreparedTransactionDetailsAsJSON();
+      String result = control.listPreparedTransactionDetailsAsJSON();
+      Assert.assertTrue("".equals(result) || (JsonUtil.readJsonArray(result) instanceof JsonArray));
    }
 
    @Test

Reply | Threaded
Open this post in threaded view
|

[2/2] activemq-artemis git commit: This closes #1854

jbertram
This closes #1854


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/846f36e9
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/846f36e9
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/846f36e9

Branch: refs/heads/1.x
Commit: 846f36e98b677e2701e88145f9e801bf486db075
Parents: a90adae de7f6de
Author: Justin Bertram <[hidden email]>
Authored: Mon Feb 12 10:32:20 2018 -0600
Committer: Justin Bertram <[hidden email]>
Committed: Mon Feb 12 10:32:20 2018 -0600

----------------------------------------------------------------------
 .../activemq/artemis/jms/server/impl/JMSServerManagerImpl.java    | 2 +-
 .../integration/jms/server/management/JMSServerControlTest.java   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------