I'm working with one project which is not opensource and I need to modify one or more its classes.
In one class is following collection:
private Map<Integer, TTP> ttp = new HashMap<>();
All what I need to do is use reflection and use concurrenthashmap here. I've tried following code but it doesnt work.
Field f = ..getClass().getDeclaredField("ttp");
f.setAccessible(true);
f.set(null, new ConcurrentHashMap<>());