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

Conversation

TimmyYu
Copy link

@TimmyYu TimmyYu commented Aug 29, 2024

Error reading configuration file name using Polaris configuration center

[issue]Fix the issue where a list is parsed as a map at the upper level during parsing. Directly converting it to a list may throw an exception.
Copy link


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. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@@ -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.

有空修复吗,

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.

2 participants