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 sl...@apache.org on 2025/01/10 01:30:55 UTC
(hadoop) branch trunk updated: HADOOP-19305: Fix ProcessEnvironment ClassCastException in Shell.java (#7106) Contributed by Butao Zhang.
This is an automated email from the ASF dual-hosted git repository.
slfan1989 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 1bd4835a3d1 HADOOP-19305: Fix ProcessEnvironment ClassCastException in Shell.java (#7106) Contributed by Butao Zhang.
1bd4835a3d1 is described below
commit 1bd4835a3d10dd7af1f91cea7970ea4b007d60d7
Author: Butao Zhang <bu...@163.com>
AuthorDate: Fri Jan 10 09:30:46 2025 +0800
HADOOP-19305: Fix ProcessEnvironment ClassCastException in Shell.java (#7106) Contributed by Butao Zhang.
Signed-off-by: Shilun Fan <sl...@apache.org>
---
.../hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
index e0d199ea863..c53ddc0725c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
@@ -977,7 +977,9 @@ public abstract class Shell {
builder.environment().clear();
}
- builder.environment().putAll(this.environment);
+ if (!environment.isEmpty()) {
+ builder.environment().putAll(this.environment);
+ }
if (dir != null) {
builder.directory(this.dir);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org