javeme commented on code in PR #2061:
URL:
https://github.com/apache/incubator-hugegraph/pull/2061#discussion_r1058459196
##########
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:
note also need to update `HugeEdge.property(String key, V value)` to add
null value check (the same as `HugeVertex.property(String key, V value)`):
```java
if (value == null) {
this.removeProperty(propertyKey.id());
return EmptyProperty.instance();
}
```
--
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]