Alonexc opened a new issue, #3516:
URL: https://github.com/apache/incubator-eventmesh/issues/3516

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Enhancement Request
   
   located at:
   
eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/SubClientImpl.java
   analysis and explanation:
   a. Field may be 'final'[line 52,56]
   
![image](https://user-images.githubusercontent.com/91315508/226837298-743d3df0-772b-44de-9e02-02a3394ed384.png)
   
![image](https://user-images.githubusercontent.com/91315508/226837308-53366303-6365-41ea-ab50-3c5d0c73e078.png)
   
   b. Anonymous new Runnable() can be replaced with lambda[line 99]
   
![image](https://user-images.githubusercontent.com/91315508/226837342-295f6683-c1df-48be-aa8a-16329fca06da.png)
   
   c. Swap these 2 arguments so they are in the correct order: expected value, 
actual value.[line 168-183]
   
![image](https://user-images.githubusercontent.com/91315508/226837374-1e76b322-8a6a-40d2-bb6d-8f400e1de258.png)
   
   d. Duplicate branch in 'switch'[line 186,189]
   
![image](https://user-images.githubusercontent.com/91315508/226837408-6881c2a8-4e87-4c07-83ee-4ddb50fae84b.png)
   
   e. 'if' statement can be simplified[line 194]
   
![image](https://user-images.githubusercontent.com/91315508/226837448-e58c4a4a-f3bb-4be3-b5d1-2d77930a242f.png)
   
   
   ### Describe the solution you'd like
   
   a. add final.
   b. Replace with lambda
   
![image](https://user-images.githubusercontent.com/91315508/226837489-939dc85d-5e7e-46d2-82b8-1a42ab36139a.png)
   
   c. Swap actual and expected values.
   
![image](https://user-images.githubusercontent.com/91315508/226837533-a49a798f-dae9-4c70-8eef-27f90e913210.png)
   
   d. Merge the case
   
![image](https://user-images.githubusercontent.com/91315508/226837565-a4836226-83cc-4afe-9b81-1cd3502c6a12.png)
   
   e. Simplify “if else”
   
![image](https://user-images.githubusercontent.com/91315508/226837593-d701d8d7-1302-4a63-b089-97d4e0ad15fb.png)
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to