This is an automated email from the ASF dual-hosted git repository.
huxing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new de204cf Optimize code: remove unnecessary judgment code. (#3196)
de204cf is described below
commit de204cf1879922ae64e2622e97aa36d690ab8a24
Author: 于玉桔 <[email protected]>
AuthorDate: Mon Jan 14 23:34:29 2019 +0800
Optimize code: remove unnecessary judgment code. (#3196)
---
.../org/apache/dubbo/common/utils/CompatibleTypeUtils.java | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java
b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java
index de96eeb..efc570f 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CompatibleTypeUtils.java
@@ -104,15 +104,10 @@ public class CompatibleTypeUtils {
// Process string to char array for generic invoke
// See
// - https://github.com/apache/incubator-dubbo/issues/2003
- if (string == null) {
- return null;
- }
- else {
- int len = string.length();
- char[] chars = new char[len];
- string.getChars(0, len, chars, 0);
- return chars;
- }
+ int len = string.length();
+ char[] chars = new char[len];
+ string.getChars(0, len, chars, 0);
+ return chars;
}
} else if (value instanceof Number) {
Number number = (Number) value;