This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git
The following commit(s) were added to refs/heads/master by this push:
new fb48e831f fix: empty label exception should be labelCanNotBeNull()
(#2063)
fb48e831f is described below
commit fb48e831f7bfbd25aeaf39fd5f2f409cd865d38a
Author: seagle <[email protected]>
AuthorDate: Fri Dec 30 11:57:37 2022 +0800
fix: empty label exception should be labelCanNotBeNull() (#2063)
---
.../src/main/java/org/apache/hugegraph/structure/HugeElement.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java
b/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java
index 3e5d56ca0..23f74f522 100644
---
a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java
+++
b/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java
@@ -431,6 +431,9 @@ public abstract class HugeElement implements Element,
GraphType, Idfiable {
.providedKeyValuesMustHaveALegalKeyOnEvenIndices();
}
if (val == null) {
+ if (key.equals(T.label)) {
+ throw Element.Exceptions.labelCanNotBeNull();
+ }
throw Property.Exceptions.propertyDoesNotExist();
}