This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.2 by this push:
     new fc0f88f4f2 Fix MigrationRule changing when load consumer default value 
(#13237)
fc0f88f4f2 is described below

commit fc0f88f4f2f70c00c7e7328dd115b1b6c0b5857d
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Oct 20 15:32:01 2023 +0800

    Fix MigrationRule changing when load consumer default value (#13237)
---
 .../apache/dubbo/registry/client/migration/model/MigrationRule.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/model/MigrationRule.java
 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/model/MigrationRule.java
index c42354125a..846cfba368 100644
--- 
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/model/MigrationRule.java
+++ 
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/model/MigrationRule.java
@@ -166,9 +166,8 @@ public class MigrationRule {
          */
         if (step == null) {
             // initial step : APPLICATION_FIRST
-            step = MigrationStep.APPLICATION_FIRST;
-            step = Enum.valueOf(MigrationStep.class,
-                consumerURL.getParameter(MIGRATION_STEP_KEY, 
getDefaultStep(consumerURL, step.name())));
+            return Enum.valueOf(MigrationStep.class,
+                consumerURL.getParameter(MIGRATION_STEP_KEY, 
getDefaultStep(consumerURL, MigrationStep.APPLICATION_FIRST.name())));
         }
 
         return step;

Reply via email to