You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/04/25 09:03:24 UTC

[GitHub] [servicecomb-java-chassis] m13922236379 opened a new pull request, #2799: [#2795]Fixed the issue that the dynamic modification configuration of gray release is invalid.

m13922236379 opened a new pull request, #2799:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2799

   The new constructor makes the original constructor invalid.Combine the two constructors so that the class is loaded correctly.


-- 
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: commits-unsubscribe@servicecomb.apache.org

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


[GitHub] [servicecomb-java-chassis] Shoothzj commented on a diff in pull request #2799: [#2795]Fixed the issue that the dynamic modification configuration of gray release is invalid.

Posted by GitBox <gi...@apache.org>.
Shoothzj commented on code in PR #2799:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2799#discussion_r857414360


##########
governance/src/main/java/org/apache/servicecomb/router/cache/RouterRuleCache.java:
##########
@@ -49,20 +49,17 @@ public class RouterRuleCache {
 
   private Environment environment;
 
-  @Autowired
-  public RouterRuleCache(Environment environment) {
-    this.environment = environment;
-  }
-
   private final ConcurrentHashMap<String, ServiceInfoCache> serviceInfoCacheMap = new ConcurrentHashMap<>();
 
   private final Object lock = new Object();
 
   private final Representer representer = new Representer();
 
-  public RouterRuleCache() {
+  @Autowired
+  public RouterRuleCache(Environment environment) {
     representer.getPropertyUtils().setSkipMissingProperties(true);
     GovernanceEventManager.register(this);
+    this.environment = environment;

Review Comment:
   maybe we should put this line to the first line of consturctor



##########
governance/src/main/java/org/apache/servicecomb/router/cache/RouterRuleCache.java:
##########
@@ -49,20 +49,17 @@ public class RouterRuleCache {
 
   private Environment environment;
 
-  @Autowired
-  public RouterRuleCache(Environment environment) {
-    this.environment = environment;
-  }
-
   private final ConcurrentHashMap<String, ServiceInfoCache> serviceInfoCacheMap = new ConcurrentHashMap<>();
 
   private final Object lock = new Object();
 
   private final Representer representer = new Representer();
 
-  public RouterRuleCache() {
+  @Autowired
+  public RouterRuleCache(Environment environment) {

Review Comment:
   can we mark environment final?



-- 
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: commits-unsubscribe@servicecomb.apache.org

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


[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #2799: [#2795]Fixed the issue that the dynamic modification configuration of gray release is invalid.

Posted by GitBox <gi...@apache.org>.
liubao68 merged PR #2799:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2799


-- 
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: commits-unsubscribe@servicecomb.apache.org

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