1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
109
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
class Reader extends Consumer implements Runnable {
public void run() {
int[] deepCopy;
synchronized (Shared.cache) {
int[] value = Shared.cache.get("key");
deepCopy = Arrays.copyOf(value, value.length);
}
consume(deepCopy);
}
}
// {
Enter to Rename, Shift+Enter to Preview