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

when i test the demo code,the console return NullPointerException #5222

Closed
mircoteam opened this issue Oct 23, 2019 · 2 comments
Closed

when i test the demo code,the console return NullPointerException #5222

mircoteam opened this issue Oct 23, 2019 · 2 comments

Comments

@mircoteam
Copy link

            org.apache.dubbo.config.AbstractInterfaceConfig#useRegistryForConfigIfNecessary

ConfigCenterConfig cc = configManager.getConfigCenter().orElse(new ConfigCenterConfig());
if (rc.getParameters() != null) {
Map<String, String> configParams = cc.getParameters() == null ? new HashMap<>() : cc.getParameters();
configParams.putAll(rc.getParameters());
cc.setParameters(configParams);
}
cc.getParameters().put(org.apache.dubbo.remoting.Constants.CLIENT_KEY,rc.getClient());

when rc.getParameters() is null then cc.getParameters() is null, it`s will show NullPointerException.

please check cc.getParameters() is null and init before use it.

@chickenlj
Copy link
Contributor

#5219

Thanks for reporting, please focus on this issue and help test

@ZhiQinIsZhen
Copy link

我也刚刚替换成2.7.4,也出现了同样的问题

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

No branches or pull requests

3 participants