javeme commented on code in PR #2063:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2063#discussion_r1058951657


##########
hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java:
##########
@@ -430,13 +430,15 @@ public static final ElementKeys classifyKeys(Object... 
keyValues) {
                 throw Element.Exceptions
                       .providedKeyValuesMustHaveALegalKeyOnEvenIndices();
             }
-            if (val == null) {
-                throw Property.Exceptions.propertyDoesNotExist();
-            }
 
             if (key.equals(T.id)) {
                 elemKeys.id = val;
             } else if (key.equals(T.label)) {
+
+                if(val==null){

Review Comment:
   expect a space before "(" and "{"



##########
hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java:
##########
@@ -430,13 +430,15 @@ public static final ElementKeys classifyKeys(Object... 
keyValues) {
                 throw Element.Exceptions
                       .providedKeyValuesMustHaveALegalKeyOnEvenIndices();
             }
-            if (val == null) {
-                throw Property.Exceptions.propertyDoesNotExist();
-            }
 
             if (key.equals(T.id)) {
                 elemKeys.id = val;
             } else if (key.equals(T.label)) {
+
+                if(val==null){
+                    throw Element.Exceptions.labelCanNotBeNull();

Review Comment:
   prefer to keep the `throw Property.Exceptions.propertyDoesNotExist();` and 
throw labelCanNotBeNull() if  `key.equals(T.label)`.



-- 
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

Reply via email to