imbajin commented on code in PR #2862:
URL:
https://github.com/apache/incubator-hugegraph/pull/2862#discussion_r2313276967
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java:
##########
@@ -128,14 +129,19 @@ public static int compareType(Id id1, Id id2) {
public static class StringId implements Id {
protected String id;
+ protected byte[] bytes;
public StringId(String id) {
Review Comment:
**Inconsistent State Risk**: The constructor initializes `bytes = null`
explicitly, but the state where both `id` and `bytes` are null is not handled.
Consider adding validation to ensure at least one field is non-null, or
document the invariant that exactly one field should be null at any time.
--
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]