Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 73253ec

Browse files
author
Brord van Wierst
authored
Merge pull request #208 from kwek20/dev
Fixed issue with the store
2 parents 364aa6b + 4454de3 commit 73253ec

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

jota/src/main/java/org/iota/jota/account/ExportedAccountState.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ public class ExportedAccountState {
99
private String id;
1010

1111
private AccountState state;
12+
13+
public ExportedAccountState() {
14+
15+
}
1216

1317
public ExportedAccountState(Date exportedDate, String id, AccountState state) {
1418
this.exportedDate = exportedDate;
@@ -27,4 +31,9 @@ public String getId() {
2731
public AccountState getState() {
2832
return state;
2933
}
34+
35+
@Override
36+
public String toString() {
37+
return "ExportedAccountState [exportedDate=" + exportedDate + ", id=" + id + ", state=" + state + "]";
38+
}
3039
}

jota/src/main/java/org/iota/jota/store/MemoryStore.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public MemoryStore() {
1818
}
1919

2020
public MemoryStore(Map<String, Serializable> store) {
21-
this.store = store;
21+
// Copy to ensure writeability
22+
this.store = new ConcurrentHashMap<String, Serializable>(store);
2223
}
2324

2425
@Override

0 commit comments

Comments
 (0)