This is an automated email from the ASF dual-hosted git repository. xiaoyu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push: new bf3466fe9d [type:improve] Get rid of the dead code and add some improvements (#5803) bf3466fe9d is described below commit bf3466fe9dd2a144b901eaa8344d1a0024184b95 Author: po-168 <po...@foxmail.com> AuthorDate: Tue Nov 26 11:45:38 2024 +0800 [type:improve] Get rid of the dead code and add some improvements (#5803) * [type:improve] Get rid of the dead code and add some improvements * [type:improve] Get rid of the dead code and add some improvements * [type:improve] Get rid of the dead code and add some improvements(#5803) --------- Co-authored-by: aias00 <liuhon...@apache.org> Co-authored-by: xiaoyu <xia...@apache.org> --- .../register/ShenyuClientRegisterDubboServiceImpl.java | 5 ----- .../src/main/http/http-test-api-local.http | 14 +++++++------- .../shenyu-examples-http/src/main/http/http-test-api.http | 4 ++-- .../org/apache/shenyu/plugin/base/utils/BeanHolder.java | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/register/ShenyuClientRegisterDubboServiceImpl.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/register/ShenyuClientRegisterDubboServiceImpl.java index 3ca7e03626..86eefa9a32 100644 --- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/register/ShenyuClientRegisterDubboServiceImpl.java +++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/register/ShenyuClientRegisterDubboServiceImpl.java @@ -21,7 +21,6 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.shenyu.admin.model.entity.MetaDataDO; import org.apache.shenyu.admin.model.entity.SelectorDO; import org.apache.shenyu.admin.service.MetaDataService; -import org.apache.shenyu.admin.service.converter.DubboSelectorHandleConverter; import org.apache.shenyu.admin.utils.CommonUpstreamUtils; import org.apache.shenyu.common.dto.convert.rule.impl.DubboRuleHandle; import org.apache.shenyu.common.dto.convert.selector.DubboUpstream; @@ -32,7 +31,6 @@ import org.apache.shenyu.register.common.dto.URIRegisterDTO; import org.apache.shenyu.register.common.enums.EventType; import org.springframework.stereotype.Service; -import jakarta.annotation.Resource; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.stream.Collectors; @@ -43,9 +41,6 @@ import java.util.stream.Collectors; @Service public class ShenyuClientRegisterDubboServiceImpl extends AbstractShenyuClientRegisterServiceImpl { - @Resource - private DubboSelectorHandleConverter dubboSelectorHandleConverter; - @Override public String rpcType() { return RpcTypeEnum.DUBBO.getName(); diff --git a/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api-local.http b/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api-local.http index da56aaea98..67e8413015 100644 --- a/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api-local.http +++ b/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api-local.http @@ -18,32 +18,32 @@ # Not practical gateway, start it separately # if you used IDEA, start example project. click green button.Quick access! -### example local orderSave +### example local hello POST http://localhost:8189/hello Accept: application/json Content-Type: application/json -### example local orderSave +### example local hi POST http://localhost:8189/hi?name=Tom Accept: application/json Content-Type: application/json -### example local orderSave +### example local hi POST http://localhost:8189/post/hi?name=Tom Accept: application/json Content-Type: application/json -### example local orderSave +### example local hello POST http://localhost:8189/shenyu/client/hello Accept: application/json Content-Type: application/json -### example local orderSave +### example local hi POST http://localhost:8189/shenyu/client/hi?name=Tom Accept: application/json Content-Type: application/json -### example local orderSave +### example local hi POST http://localhost:8189/shenyu/client/post/hi?name=Tom Accept: application/json Content-Type: application/json @@ -57,7 +57,7 @@ Content-Type: application/json "id": 123, "name": "order" } -### example local orderSave +### example local findById GET http://localhost:8189/order/findById?id=123 Accept: application/json Content-Type: application/json diff --git a/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api.http b/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api.http index 728b04a84d..c278d6b59a 100644 --- a/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api.http +++ b/shenyu-examples/shenyu-examples-http/src/main/http/http-test-api.http @@ -62,7 +62,7 @@ Content-Type: application/json "id": 123, "name": "order" } -### shengyu getway proxy orderSave +### shengyu getway proxy findById GET http://localhost:9195/http/order/findById?id=123 Accept: application/json Content-Type: application/json @@ -132,7 +132,7 @@ GET http://localhost:9195/http/test/findByUserId?userId=%25 Accept: application/json Content-Type: application/json -### shengyu getway proxy findByUserId +### shengyu getway proxy findByUserIdName GET http://localhost:9195/http/test/findByUserIdName?userId=#&name=shenyu Accept: application/json Content-Type: application/json diff --git a/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/utils/BeanHolder.java b/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/utils/BeanHolder.java index 5e8880aef8..c733d47b73 100644 --- a/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/utils/BeanHolder.java +++ b/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/utils/BeanHolder.java @@ -54,7 +54,7 @@ public class BeanHolder<O> implements Supplier<O> { * @return boolean */ public boolean isNull() { - return o == null; + return Objects.isNull(o); } /**