roryqi commented on code in PR #12366:
URL: https://github.com/apache/gravitino/pull/12366#discussion_r3747730633


##########
api/src/main/java/org/apache/gravitino/secret/SecretUrn.java:
##########
@@ -69,6 +69,22 @@ public List<String> identifierSegments() {
     return identifierSegments;
   }
 
+  /**
+   * Returns the property key encoded as the last identifier segment.
+   *
+   * <p>Gravitino secret URNs end with the entity property key that stores the 
URN (see {@link
+   * #buildWriteThrough}).
+   *
+   * @return the property key
+   * @throws IllegalArgumentException if this URN has no identifier segments
+   */
+  public String propertyKey() {

Review Comment:
   This logic is weird. Why do we need to throw the exception after validating 
segments in the constructor method.



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

Reply via email to