You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2022/12/07 17:05:57 UTC
[maven-mvnd] branch master updated: Reset system properties after calling event syps (#729)
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
The following commit(s) were added to refs/heads/master by this push:
new eedcb77e Reset system properties after calling event syps (#729)
eedcb77e is described below
commit eedcb77e3cf545c191cb53f00715259e801e29b3
Author: Stefan Oehme <st...@gmail.com>
AuthorDate: Wed Dec 7 18:05:50 2022 +0100
Reset system properties after calling event syps (#729)
Event spies may want to read system properties, which will fail if they are reset
too early. This change makes the behavior consistent with regular Maven.
---
daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java b/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java
index 8108bb75..cda855f0 100644
--- a/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java
+++ b/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java
@@ -237,8 +237,8 @@ public class DaemonMavenCli {
} catch (ExitException e) {
return e.exitCode;
} finally {
- System.setProperties(props);
eventSpyDispatcher.close();
+ System.setProperties(props);
Thread.currentThread().setContextClassLoader(tccl);
}
}