Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX(arthas.core):修复javaagent指定arthas.properties路径加载错误 #1852

Merged
merged 3 commits into from
Jul 8, 2021

Conversation

wochidaxiangchang
Copy link
Contributor

image
原bug,可以看到指定配置文件路径后,参数传递正常,但是通过resolvePlaceholders无法拿到路径。
故修改为arthasEnvironment.getProperty(CONFIG_LOCATION_PROPERTY); 之后便可以正常获取路径参数。

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


tszwang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -299,7 +299,7 @@ private void tryToLoadArthasProperties() throws IOException {
String location = null;

if (arthasEnvironment.containsProperty(CONFIG_LOCATION_PROPERTY)) {
location = arthasEnvironment.resolvePlaceholders(CONFIG_LOCATION_PROPERTY);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里 resolvePlaceholders 是对的,只是需要改为
arthasEnvironment.resolvePlaceholders(arthasEnvironment.getProperty(CONFIG_LOCATION_PROPERTY));

还有另外一个 NAME 也需要这样子处理。

@hengyunabc hengyunabc added this to the 3.5.3 milestone Jul 8, 2021
@hengyunabc hengyunabc merged commit 2ab1bca into alibaba:master Jul 8, 2021
hengyunabc added a commit that referenced this pull request Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants