Copilot commented on code in PR #769: URL: https://github.com/apache/incubator-graphar/pull/769#discussion_r2358780070
########## maven-projects/info/src/main/java/org/apache/graphar/info/EdgeInfo.java: ########## @@ -576,6 +578,56 @@ private void checkPropertyGroupExist(PropertyGroup propertyGroup) { } } + public boolean isValidated() { + // Check if source type, edge type, or destination type is empty + if (getSrcType() == null + || getSrcType().isEmpty() + || getEdgeType() == null + || getEdgeType().isEmpty() + || getDstType() == null + || getDstType().isEmpty()) { + return false; + } + + // Check if chunk sizes are positive + if (chunkSize <= 0 || srcChunkSize <= 0 || dstChunkSize <= 0) { + return false; + } Review Comment: [nitpick] The validation logic mixes null checks with emptiness checks in a complex conditional. Consider extracting this into a helper method like `private boolean isValidString(String value)` to improve readability and reusability. ########## maven-projects/info/src/main/java/org/apache/graphar/info/PropertyGroup.java: ########## @@ -192,26 +235,17 @@ List<PropertyGroup> getPropertyGroupList() { return propertyGroupList; } - Map<String, PropertyGroup> getPropertyGroupMap() { - return propertyGroupMap; - } - PropertyGroup getPropertyGroup(String propertyName) { checkPropertyExist(propertyName); return propertyGroupMap.get(propertyName); } - Map<String, Property> getProperties() { - return properties; - } - private void checkPropertyExist(String propertyName) { if (null == propertyName) { throw new IllegalArgumentException("Property name is null"); } if (!hasProperty(propertyName)) { - throw new IllegalArgumentException( - "Property " + propertyName + " does not exist in the property group " + this); + throw new IllegalArgumentException("Property " + propertyName + " does not exist"); Review Comment: The error message has been made less specific. The original error message included context about which property group the property doesn't exist in, which would be more helpful for debugging. Consider keeping the original format or providing equivalent context. -- 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: commits-unsubscr...@graphar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@graphar.apache.org For additional commands, e-mail: commits-h...@graphar.apache.org