Skip to content

Commit

Permalink
address the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryshao committed May 23, 2024
1 parent deae5e6 commit adc46ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/main/java/com/datastrato/gravitino/tag/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ default Extended extended() {
/** The extended information of the tag. */
interface Extended {
/** @return The number of objects that are using this tag. */
int inUse();
default int inUse() {
MetadataObject[] objects = usedObjects();
return objects == null ? 0 : objects.length;
}

/** @return The list of objects that are using this tag. */
MetadataObject[] usedObjects();
Expand Down

0 comments on commit adc46ed

Please sign in to comment.