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

   ### 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
   
   
![image](https://user-images.githubusercontent.com/91315508/225791716-1083ca39-334f-4c6a-a7cd-8869b278cfe6.png)
   located at:
   
eventmesh-webhook/eventmesh-webhook-api/src/main/java/org/apache/eventmesh/webhook/api/Manufacturer.java
 line 57
   analysis and explanation:
   It’s a common pattern to test the result of a java.util.Map.get() against 
null or calling java.util.Map.containsKey() before proceeding with adding or 
changing the value in the map. However the java.util.Map API offers a 
significantly better alternative in the form of the computeIfPresent() and 
computeIfAbsent() methods. Using these instead leads to cleaner and more 
readable code.
   
   
   ### Describe the solution you'd like
   
   
![image](https://user-images.githubusercontent.com/91315508/225791753-446f1442-be36-4512-b94f-f5b182db4f0e.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