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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1b2e6dc  remove some magic value (#4752)
1b2e6dc is described below

commit 1b2e6dcae46ba61874df21d17a127d65de4727e3
Author: zhangzhikai <[email protected]>
AuthorDate: Tue Aug 6 15:23:45 2019 +0800

    remove some magic value (#4752)
    
    * fixed typo of variable
    
    * remove magic value
---
 .../src/main/java/org/apache/dubbo/config/ServiceConfig.java        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
 
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
index 451ee83..19f83cc 100644
--- 
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
+++ 
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@@ -325,7 +325,7 @@ public class ServiceConfig<T> extends AbstractServiceConfig 
{
             generic = Boolean.FALSE.toString();
         }
         if (local != null) {
-            if ("true".equals(local)) {
+            if (Boolean.TRUE.toString().equals(local)) {
                 local = interfaceName + "Local";
             }
             Class<?> localClass;
@@ -339,7 +339,7 @@ public class ServiceConfig<T> extends AbstractServiceConfig 
{
             }
         }
         if (stub != null) {
-            if ("true".equals(stub)) {
+            if (Boolean.TRUE.toString().equals(stub)) {
                 stub = interfaceName + "Stub";
             }
             Class<?> stubClass;
@@ -482,7 +482,7 @@ public class ServiceConfig<T> extends AbstractServiceConfig 
{
                 String retryKey = method.getName() + ".retry";
                 if (map.containsKey(retryKey)) {
                     String retryValue = map.remove(retryKey);
-                    if ("false".equals(retryValue)) {
+                    if (Boolean.FALSE.toString().equals(retryValue)) {
                         map.put(method.getName() + ".retries", "0");
                     }
                 }

Reply via email to