unlock under finally

This commit is contained in:
Evgeny Pasynkov
2014-06-10 12:52:18 +02:00
parent 9ab9a99235
commit 6246ee28be
@@ -82,9 +82,13 @@ public class RecentStringInterner {
public void clear() {
for(int i = 0; i < myInterns.length; ++i) {
myStripeLocks[i].lock();
myInterns[i].clear();
myStripeLocks[i].unlock();
try {
myStripeLocks[i].lock();
myInterns[i].clear();
}
finally {
myStripeLocks[i].unlock();
}
}
}
}