fix ArthasAgent NullPointerException. #1546

This commit is contained in:
hengyunabc
2020-10-22 15:04:59 +08:00
parent 5e73f49abd
commit a2b45c45b8
2 changed files with 8 additions and 2 deletions
@@ -189,7 +189,10 @@ public class ArthasBootstrap {
* https://github.com/alibaba/arthas/issues/986
* </pre>
*/
Map<String, String> copyMap = new HashMap<String, String>(argsMap);
Map<String, String> copyMap = new HashMap<String, String>();
if (argsMap != null) {
copyMap.putAll(argsMap);
}
// 添加 arthas.home
if (!copyMap.containsKey(ARTHAS_HOME_PROPERTY)) {
copyMap.put(ARTHAS_HOME_PROPERTY, arthasHome());