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

[ISSUE #481] Add defaultNamespace to both producer and consumer . (#481) #482

Merged
merged 2 commits into from
Sep 6, 2022

Conversation

zhouhai22
Copy link
Contributor

What is the purpose of the change

Add defaultNamespace to both producer and consumer

Brief changelog

prefer to use the namespace specified by annotation, or a defaultNamespace from property file will be used.

duhenglucky
duhenglucky previously approved these changes Sep 6, 2022
@ShannonDing ShannonDing merged commit 15f81e6 into apache:master Sep 6, 2022
public static String getNamespace(String specifiedNamespace, String defaultNamespace) {
// prefer to use annotation namespace
// if is empty a default namespace will be used
return !StringUtils.hasLength(specifiedNamespace) && StringUtils.hasLength(defaultNamespace) ? defaultNamespace : specifiedNamespace;
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using the isBlank method to avoid the influence brought by whitespace?

@RongtongJin RongtongJin added this to the 2.2.3 milestone Jan 29, 2023
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.

5 participants