HADOOP-15865. ConcurrentModificationException in Configuration.overlay() method. Contributed by Oleksandr Shevchenko.
(cherry picked from commit e872ceb810a343da7fce7185dca78d3b9aad9b7b) (cherry picked from commit 46e72775f5b2156f49b15beac8bffff9cd5aad7f)
This commit is contained in:
parent
8fc4e406ad
commit
72ef752876
@ -3395,8 +3395,10 @@ private void readTagFromConfig(String attributeValue, String confName, String
|
||||
}
|
||||
|
||||
private void overlay(Properties to, Properties from) {
|
||||
for (Entry<Object, Object> entry: from.entrySet()) {
|
||||
to.put(entry.getKey(), entry.getValue());
|
||||
synchronized (from) {
|
||||
for (Entry<Object, Object> entry : from.entrySet()) {
|
||||
to.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user