This closes #257

This commit is contained in:
Clebert Suconic 2015-12-07 13:48:53 -05:00
commit b0007c4533
2 changed files with 14 additions and 2 deletions

View File

@ -72,7 +72,13 @@ public abstract class TransactionDetail {
detailJson.put(KEY_XID_BRANCH_QUAL, new String(this.xid.getBranchQualifier()));
JSONArray msgsJson = new JSONArray();
List<TransactionOperation> txops = this.transaction.getAllOperations();
List<TransactionOperation> txops = null;
if (this.transaction != null) {
txops = this.transaction.getAllOperations();
}
detailJson.put(KEY_TX_RELATED_MESSAGES, msgsJson);
if (txops == null) {
return detailJson;

View File

@ -392,7 +392,13 @@ public class TransactionImpl implements Transaction {
@Override
public synchronized List<TransactionOperation> getAllOperations() {
return new ArrayList<TransactionOperation>(operations);
if (operations != null) {
return new ArrayList<TransactionOperation>(operations);
}
else {
return new ArrayList<TransactionOperation>();
}
}
@Override