You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/06/14 08:20:04 UTC

[GitHub] [dubbo] AlbumenJ opened a new pull request, #10156: [3.0] Exact json utils

AlbumenJ opened a new pull request, #10156:
URL: https://github.com/apache/dubbo/pull/10156

   ## What is the purpose of the change
   
   
   
   ## Brief changelog
   
   
   ## Verifying this change
   
   
   <!-- Follow this checklist to help us incorporate your contribution quickly and easily: -->
   
   ## Checklist
   - [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
   - [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
   - [ ] Add some description to [dubbo-website](https://github.com/apache/dubbo-website) project if you are requesting to add a feature.
   - [ ] GitHub Actions works fine on your own branch.
   - [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/dubbo/wiki/Software-donation-guide).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on code in PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#discussion_r897503510


##########
dubbo-common/src/main/java/org/apache/dubbo/common/config/configcenter/DynamicConfiguration.java:
##########
@@ -176,18 +174,6 @@ default boolean publishConfigCas(String key, String group, String content, Objec
         return false;
     }
 
-    /**
-     * Get the config keys by the specified group
-     *
-     * @param group the specified group
-     * @return the read-only non-null sorted {@link Set set} of config keys
-     * @throws UnsupportedOperationException If the under layer does not support
-     * @since 2.7.5
-     */
-    default SortedSet<String> getConfigKeys(String group) throws UnsupportedOperationException {
-        return Collections.emptySortedSet();
-    }
-
     /**

Review Comment:
   `getConfigKeys` is no longer needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj commented on pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
chickenlj commented on PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#issuecomment-1156091043

   related issue https://github.com/apache/dubbo/issues/10107


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] Shiyajian commented on a diff in pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
Shiyajian commented on code in PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#discussion_r913411939


##########
dubbo-common/src/main/java/org/apache/dubbo/common/utils/JsonUtils.java:
##########
@@ -16,12 +16,11 @@
  */
 package org.apache.dubbo.common.utils;
 
-import com.google.gson.Gson;
+import org.apache.dubbo.common.json.JSON;
+import org.apache.dubbo.common.json.impl.FastJsonImpl;
 
 public class JsonUtils {
-    private static final Gson gson = new Gson();
-
-    public static Gson getGson() {
-        return gson;
+    public static JSON getJson() {

Review Comment:
   @chickenlj  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] codecov-commenter commented on pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#issuecomment-1154904621

   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/10156?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10156](https://codecov.io/gh/apache/dubbo/pull/10156?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f492c0b) into [3.0](https://codecov.io/gh/apache/dubbo/commit/b4b0aab8a05998d2e47a00aa3bf2f36af10a1017?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b4b0aab) will **decrease** coverage by `0.33%`.
   > The diff coverage is `63.72%`.
   
   > :exclamation: Current head f492c0b differs from pull request most recent head cb4ca54. Consider uploading reports for the commit cb4ca54 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##                3.0   #10156      +/-   ##
   ============================================
   - Coverage     65.62%   65.29%   -0.34%     
   + Complexity      320      294      -26     
   ============================================
     Files          1223     1225       +2     
     Lines         53205    53276      +71     
     Branches       8060     8032      -28     
   ============================================
   - Hits          34915    34784     -131     
   - Misses        14471    14666     +195     
   - Partials       3819     3826       +7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/10156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...mmon/config/configcenter/DynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9EeW5hbWljQ29uZmlndXJhdGlvbi5qYXZh) | `64.70% <ø> (-1.97%)` | :arrow_down: |
   | [...fig/configcenter/TreePathDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9UcmVlUGF0aER5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `65.62% <ø> (+5.62%)` | :arrow_up: |
   | [...nfig/configcenter/nop/NopDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci9ub3AvTm9wRHluYW1pY0NvbmZpZ3VyYXRpb24uamF2YQ==) | `25.00% <ø> (+2.77%)` | :arrow_up: |
   | [...gcenter/wrapper/CompositeDynamicConfiguration.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vY29uZmlnL2NvbmZpZ2NlbnRlci93cmFwcGVyL0NvbXBvc2l0ZUR5bmFtaWNDb25maWd1cmF0aW9uLmphdmE=) | `69.23% <ø> (+1.73%)` | :arrow_up: |
   | [.../metadata/definition/ServiceDefinitionBuilder.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9kZWZpbml0aW9uL1NlcnZpY2VEZWZpbml0aW9uQnVpbGRlci5qYXZh) | `83.33% <0.00%> (+1.93%)` | :arrow_up: |
   | [...org/apache/dubbo/metadata/MappingCacheManager.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9NYXBwaW5nQ2FjaGVNYW5hZ2VyLmphdmE=) | `47.61% <0.00%> (-4.56%)` | :arrow_down: |
   | [...ubbo/metadata/store/nacos/NacosMetadataReport.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtcmVwb3J0LW5hY29zL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9zdG9yZS9uYWNvcy9OYWNvc01ldGFkYXRhUmVwb3J0LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...va/org/apache/dubbo/rpc/support/AccessLogData.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9zdXBwb3J0L0FjY2Vzc0xvZ0RhdGEuamF2YQ==) | `53.16% <0.00%> (ø)` | |
   | [.../dubbo/registry/client/DefaultServiceInstance.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9jbGllbnQvRGVmYXVsdFNlcnZpY2VJbnN0YW5jZS5qYXZh) | `74.26% <33.33%> (-0.74%)` | :arrow_down: |
   | [.../org/apache/dubbo/monitor/dubbo/MetricsFilter.java](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbW9uaXRvci9kdWJiby1tb25pdG9yLWRlZmF1bHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL21vbml0b3IvZHViYm8vTWV0cmljc0ZpbHRlci5qYXZh) | `66.05% <37.50%> (ø)` | |
   | ... and [111 more](https://codecov.io/gh/apache/dubbo/pull/10156/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/10156?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/10156?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b4b0aab...cb4ca54](https://codecov.io/gh/apache/dubbo/pull/10156?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] Shiyajian commented on a diff in pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
Shiyajian commented on code in PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#discussion_r913406554


##########
dubbo-common/src/main/java/org/apache/dubbo/common/utils/JsonUtils.java:
##########
@@ -16,12 +16,11 @@
  */
 package org.apache.dubbo.common.utils;
 
-import com.google.gson.Gson;
+import org.apache.dubbo.common.json.JSON;
+import org.apache.dubbo.common.json.impl.FastJsonImpl;
 
 public class JsonUtils {
-    private static final Gson gson = new Gson();
-
-    public static Gson getGson() {
-        return gson;
+    public static JSON getJson() {

Review Comment:
   为什么不是单例?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj commented on pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
chickenlj commented on PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#issuecomment-1157291603

   So what will be the side effects if users upgrade to the version with this change.
   
   Will they need to add fastjson or gson dependencies explicitly to make their applications run? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on code in PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#discussion_r913450398


##########
dubbo-common/src/main/java/org/apache/dubbo/common/utils/JsonUtils.java:
##########
@@ -16,12 +16,11 @@
  */
 package org.apache.dubbo.common.utils;
 
-import com.google.gson.Gson;
+import org.apache.dubbo.common.json.JSON;
+import org.apache.dubbo.common.json.impl.FastJsonImpl;
 
 public class JsonUtils {
-    private static final Gson gson = new Gson();
-
-    public static Gson getGson() {
-        return gson;
+    public static JSON getJson() {

Review Comment:
   ![image](https://user-images.githubusercontent.com/9292748/177268922-8878a137-71f5-444b-926b-a5e112c4fca9.png)
   最新版本是单例的



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj commented on pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
chickenlj commented on PR #10156:
URL: https://github.com/apache/dubbo/pull/10156#issuecomment-1157301594

   > So what will be the side effects if users upgrade to the version with this change.
   > 
   > Will they need to add fastjson or gson dependencies explicitly to make their applications run?
   
   Never Mind. I noticed the dependencies in dubbo-common/pom.xml and dubbo-all/pom.xml are not changed so no effects will be brought to end users.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj merged pull request #10156: [3.0] Exact json utils

Posted by GitBox <gi...@apache.org>.
chickenlj merged PR #10156:
URL: https://github.com/apache/dubbo/pull/10156


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org