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

This commit is contained in:
Yeray Borges 2018-02-07 14:56:37 +00:00 committed by Justin Bertram
parent a90adaed51
commit de7f6de094
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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