Skip to content

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
@duhenglucky duhenglucky dismissed their stale review September 6, 2022 06:35

need improve

@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