-
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
[ISSUE #3046] Unify the treatment of constant variables and reduce the usage of "magic numbers" #7294
Conversation
…e/http/NamingHttpClientProxy.java
…ClientWorker.java
…ant/PropertiesConstant.java modified: config/src/main/java/com/alibaba/nacos/config/server/utils/PropertyUtil.java
…ClientWorker.java modified: client/src/main/java/com/alibaba/nacos/client/naming/remote/http/NamingHttpClientProxy.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your jdk version is too old. Please upgrade jdk version to at lease 1.8.
@@ -113,7 +113,8 @@ | |||
/** | |||
* groupKey -> cacheData. | |||
*/ | |||
private final AtomicReference<Map<String, CacheData>> cacheMap = new AtomicReference<>(new HashMap<>()); | |||
private final AtomicReference<Map<String, CacheData>> cacheMap = new AtomicReference<Map<String, CacheData>>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add type?
Thank you for the heads up! There was something wrong with my workspace that caused java to default to an earlier version |
1 Do not use magic number |
|
CLA not sign for a long time. |
What is the purpose of the change
To resolve issue #3046, unify the treatment of constant variables and reduce the usage of "magic numbers"
Brief changelog
Replacement of some of the usage of "magic numbers" for a cleaner and more maintainable approach and unify some discordand usages of the same variables
Verifying this change
eclipse-pmd was used to verify the changes