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

   ### 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/207544222-9e523623-2d33-4371-9747-e62dbc13159c.png)
   
![image](https://user-images.githubusercontent.com/91315508/207544210-e3592f7a-2e00-4f6d-947c-ca563c875928.png)
   located at:
   
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/HttpTinyClient.java
 line 110
   analysis and explanation:
   This method uses a string literal to specify a Charset encoding. However, 
the method invoked has an alternative signature that takes a Charset object. 
You should use this signature, as this class is compiled with JDK 7 (or 
better), and the Charset in question is available as a constant from the 
java.nio.charset.StandardCharsets class.
   Instead of specifying "UTF-8", use StandardCharsets.UTF_8, for instance. An 
added benefit of this is that you will not need to catch 
UnsupportedEncodingException.
   
   
   ### Describe the solution you'd like
   
   Method invocation 'getBytes' may produce 'NullPointerException'
   
![image](https://user-images.githubusercontent.com/91315508/207544299-b2d4ffd6-dfdd-4432-a5e5-406abfab657d.png)
   use StandardCharsets.UTF_8.
   
![image](https://user-images.githubusercontent.com/91315508/207544335-036287c1-35be-4a37-a3e0-8ba553e5ad3d.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