Method
snapshotEntries
(Map<String, Object> map)
Source from the content-addressed store, hash-verified
| 176 | } |
| 177 | |
| 178 | private static List<Map.Entry<String, Object>> snapshotEntries(Map<String, Object> map) { |
| 179 | // synchronized() is a no-op for an unwrapped HashMap and the correct |
| 180 | // lock for a Collections.synchronizedMap. Either way the returned |
| 181 | // ArrayList is detached from the source. |
| 182 | synchronized (map) { |
| 183 | return new ArrayList<>(map.entrySet()); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | // ---------- deepExtend2 (older impl kept as-is) ---------- |
| 188 | |
Tested by
no test coverage detected