use lockInfoMap.putIfAbsent instead of get then put: the code as it is doesn't work well under concurrent access.