You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/08/02 02:57:18 UTC
[hadoop] branch trunk updated: HADOOP-15865.
ConcurrentModificationException in Configuration.overlay() method.
Contributed by Oleksandr Shevchenko.
This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new e872ceb HADOOP-15865. ConcurrentModificationException in Configuration.overlay() method. Contributed by Oleksandr Shevchenko.
e872ceb is described below
commit e872ceb810a343da7fce7185dca78d3b9aad9b7b
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Thu Aug 1 19:56:51 2019 -0700
HADOOP-15865. ConcurrentModificationException in Configuration.overlay() method. Contributed by Oleksandr Shevchenko.
---
.../src/main/java/org/apache/hadoop/conf/Configuration.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
index c30ce0d..f48641c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
@@ -3436,8 +3436,10 @@ public class Configuration implements Iterable<Map.Entry<String,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());
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org