erdengk opened a new pull request #2965:
URL: https://github.com/apache/incubator-shenyu/pull/2965
There are two changes in this pr
1. The first is to use String instead of Map. I don't think it's necessary
to use a map just for two string variables, and using a map comes at the cost
of traversing the map.
Before:
```java
Map<String, Object> loginMap = new HashMap<>(2);
loginMap.put(Constants.LOGIN_NAME, username);
loginMap.put(Constants.PASS_WORD, password);
String result = OkHttpTools.getInstance().get(url, loginMap);
```
After:
```java
String result = OkHttpTools.getInstance().get(url, userName, passWord);
```
2. The second is to delete unit test statements that always result in true.
As shown below, the current statement is always true.
```java
ShenyuException shenyuException = new ShenyuException(throwable);
// Condition 'serializerException instanceof SerializerException' is
always 'true'
assertTrue(shenyuException instanceof ShenyuException);
```
Make sure that:
- [x] You have read the [contribution
guidelines](https://shenyu.apache.org/community/contributor).
- [x] You submit test cases (unit or integration tests) that back your
changes.
- [x] Your local test passed `mvn clean install -Dmaven.javadoc.skip=true`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]