imbajin commented on code in PR #2095:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2095#discussion_r1101438531


##########
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java:
##########
@@ -92,33 +96,21 @@ public static int getAsciiByteLength(String value) {
     }
 
     public static byte[] encode(String value) {
-        try {
-            return value.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new HugeException("Failed to encode string", e);
-        }
+        return value.getBytes(UTF_8);

Review Comment:
   > please don't change the logic
   it's recommended by the lint, and here is the differ:
   
![image](https://user-images.githubusercontent.com/17706099/217820320-55022b78-a771-41ac-beec-6b5c9d8dc774.png)
   
   



-- 
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: dev-unsubscr...@hugegraph.apache.org

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

Reply via email to