File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -134,11 +134,11 @@ public Result invoke(Invocation inv) throws RpcException {
134134 }
135135 RpcInvocation invocation = (RpcInvocation ) inv ;
136136 invocation .setInvoker (this );
137- if (attachment != null && attachment .size () > 0 ) {
137+ if (attachment != null && ! attachment .isEmpty () ) {
138138 invocation .addAttachmentsIfAbsent (attachment );
139139 }
140140 Map <String , String > contextAttachments = RpcContext .getContext ().getAttachments ();
141- if (contextAttachments != null && contextAttachments .size () != 0 ) {
141+ if (contextAttachments != null && ! contextAttachments .isEmpty () ) {
142142 /**
143143 * invocation.addAttachmentsIfAbsent(context){@link RpcInvocation#addAttachmentsIfAbsent(Map)}should not be used here,
144144 * because the {@link RpcContext#setAttachment(String, String)} is passed in the Filter when the call is triggered
You can’t perform that action at this time.
0 commit comments