-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Confuse logic? #10014
Comments
in my opinion, when "tmpNamespace" is empty, "String namespace = properties.getProperty(PropertyKeyConst.NAMESPACE) " is to get the value of "namespace" and assign it to "tmpNamespace" , not just to print log. |
but two lines code always assign value to variable |
The original logic is get NAMESPACE from JVM, if JVM has no value, get from user properties. and After some refactor for properties, all properties is merged into NacosProperties, it makes the confuse. |
@i will resolve it@ |
- add getPropertyFrom method - optimize some code logic Close alibaba#10014
This class file: https://github.com/alibaba/nacos/blob/2.2.0/client/src/main/java/com/alibaba/nacos/client/naming/utils/InitUtils.java
In method
initNamespaceForNaming
, I cant understand always use
properties.getProperty(PropertyKeyConst.NAMESPACE);`, only for priint log? there are really confiuse for me, please answer...The text was updated successfully, but these errors were encountered: