javeme commented on code in PR #2061: URL: https://github.com/apache/incubator-hugegraph/pull/2061#discussion_r1058404766
########## hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java: ########## @@ -430,9 +430,6 @@ public static final ElementKeys classifyKeys(Object... keyValues) { throw Element.Exceptions .providedKeyValuesMustHaveALegalKeyOnEvenIndices(); } - if (val == null) { - throw Property.Exceptions.propertyDoesNotExist(); Review Comment: seems need to skip the null value here with `continue`, also add the comment for why ########## hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java: ########## @@ -430,9 +430,6 @@ public static final ElementKeys classifyKeys(Object... keyValues) { throw Element.Exceptions .providedKeyValuesMustHaveALegalKeyOnEvenIndices(); } - if (val == null) { - throw Property.Exceptions.propertyDoesNotExist(); - } Review Comment: can you also fix issue 8: let throw Element.Exceptions.labelCanNotBeNull() if key.equals(T.label) ########## hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeProperty.java: ########## @@ -39,11 +39,10 @@ public HugeProperty(HugeElement owner, PropertyKey pkey, V value) { E.checkArgument(owner != null, "Property owner can't be null"); E.checkArgument(pkey != null, "Property key can't be null"); - E.checkArgument(value != null, "Property value can't be null"); this.owner = owner; this.pkey = pkey; - this.value = pkey.validValueOrThrow(value); + this.value = pkey.validValue(value); Review Comment: we can keep the origin code if the null value is skipped? -- 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