imbajin commented on code in PR #2000:
URL:
https://github.com/apache/incubator-hugegraph/pull/2000#discussion_r1012991983
##########
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdUtil.java:
##########
@@ -74,9 +74,7 @@ public static Id readBinString(Object id) {
public static String writeString(Id id) {
String idString = id.asString();
- StringBuilder sb = new StringBuilder(1 + idString.length());
- sb.append(id.type().prefix()).append(idString);
- return sb.toString();
+ return id.type().prefix() + idString;
Review Comment:
也是, 而且高版本 JDK 编译器似乎已经会自动判断开销转换了. (当然我不确定是从 JDK 几开始的)
--
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]