From b6a3416c281051bed2da0cafe852b3e1b6fcd072 Mon Sep 17 00:00:00 2001 From: hejia Date: Mon, 18 Feb 2019 11:21:27 +0800 Subject: [PATCH] Boolean class use method toString() instead of String.valueof() --- .../java/org/apache/dubbo/config/AbstractInterfaceConfig.java | 4 ++-- .../java/org/apache/dubbo/config/AbstractMethodConfig.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java index 78624d335f2..c787ceffae8 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java @@ -601,7 +601,7 @@ public void setLocal(Boolean local) { if (local == null) { setLocal((String) null); } else { - setLocal(String.valueOf(local)); + setLocal(local.toString()); } } @@ -623,7 +623,7 @@ public void setStub(Boolean stub) { if (stub == null) { setStub((String) null); } else { - setStub(String.valueOf(stub)); + setStub(stub.toString()); } } diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractMethodConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractMethodConfig.java index 0248b9a8ddf..fd751d7515c 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractMethodConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractMethodConfig.java @@ -178,7 +178,7 @@ public void setMock(Boolean mock) { if (mock == null) { setMock((String) null); } else { - setMock(String.valueOf(mock)); + setMock(mock.toString()); } }