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

Polaris configuration center parsing error when reading configuration file name #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ private Config buildConfig(Object config) {
"Polaris plugin config, wrong value type of element in [polaris.configs], expected: Map");
Map<String, Object> configMap = (Map<String, Object>) config;
String group = (String) configMap.get(POLARIS_GROUP_KEY);
List<String> names = (List<String>) configMap.get(POLARIS_FILENAMES_KEY);
List<String> names = ((Map<String, String>) configMap.get(POLARIS_FILENAMES_KEY)).values()
Copy link
Collaborator

Choose a reason for hiding this comment

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

单测没过,需要修一下。也需要评论一下“I have read the CLA Document and I hereby sign the CLA”,授权代码

Copy link
Author

Choose a reason for hiding this comment

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

单测看了一下直接就实例化成了arraylist了。就没有类型的问题了, 这里主要还是上层配置文件yaml解析到这个插件的时候 ,读取POLARIS_FILENAMES_KEY 这个值成了hashmap了。我看看能不能找到解析成map的地方在哪里 。

Copy link
Collaborator

Choose a reason for hiding this comment

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

有空修复吗,

.stream().distinct().collect(Collectors.toList());
return new Config(group, names);
}

Expand Down
Loading