Use mutable collections
@@ -6,9 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
@ApiModel
@XmlRootElement
@@ -33,7 +31,7 @@ public class PayloadDecryptRequest {
@XmlElement
@XmlMimeType("base64Binary")
@ApiModelProperty(value = "The encrypted master key, one entry for each recipient", dataType = "string")
- private List<byte[]> recipientBoxes = Collections.emptyList();
+ private List<byte[]> recipientBoxes = new ArrayList<>();
@XmlElement
@XmlMimeType("base64Binary")
@@ -43,7 +41,7 @@ public class PayloadDecryptRequest {
@XmlElement
@XmlMimeType("base64Binary")
@ApiModelProperty(value = "The recipient public keys", dataType = "string")
- private List<byte[]> recipientKeys = Collections.emptyList();
+ private List<byte[]> recipientKeys = new ArrayList<>();
@XmlElement
@ApiModelProperty(value = "The privacy mode of this transaction", allowableValues = "0, 1, 2")
@@ -52,7 +50,7 @@ public class PayloadDecryptRequest {
@XmlElement
@XmlJavaTypeAdapter(MapAdapter.class)
@ApiModelProperty(value = "A list of contracts that are affected by the execution of this transaction", dataType = "string")
- private Map<String, String> affectedContractTransactions = Collections.emptyMap();
+ private Map<String, String> affectedContractTransactions = new HashMap<>();
@XmlElement
@XmlMimeType("base64Binary")
