You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eventmesh.apache.org by "Alonexc (via GitHub)" <gi...@apache.org> on 2023/03/22 08:06:16 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #3516: [Enhancement] Do some code optimization[SubClientImpl]

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: issues-unsubscribe@eventmesh.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [I] [Enhancement] Do some code optimization[SubClientImpl] (eventmesh)

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm closed issue #3516: [Enhancement] Do some code optimization[SubClientImpl]
URL: https://github.com/apache/eventmesh/issues/3516


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] Alonexc commented on issue #3516: [Enhancement] Do some code optimization[SubClientImpl]

Posted by "Alonexc (via GitHub)" <gi...@apache.org>.
Alonexc commented on issue #3516:
URL: https://github.com/apache/eventmesh/issues/3516#issuecomment-1493484378

   @monish-byte Of course, very welcome to the eventmesh community.


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] monish-byte commented on issue #3516: [Enhancement] Do some code optimization[SubClientImpl]

Posted by "monish-byte (via GitHub)" <gi...@apache.org>.
monish-byte commented on issue #3516:
URL: https://github.com/apache/eventmesh/issues/3516#issuecomment-1493036619

   hey @Alonexc i want to work on this. I am a beginner contibuter. Can you please assign this to me ?
   


-- 
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: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org