Skip to content

Commit

Permalink
make default for list
Browse files Browse the repository at this point in the history
  • Loading branch information
jerqi committed Sep 20, 2024
1 parent 93d7d38 commit 1707153
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/main/java/org/apache/gravitino/EntityStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.io.Closeable;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import org.apache.gravitino.Entity.EntityType;
Expand Down Expand Up @@ -62,8 +63,10 @@ public interface EntityStore extends Closeable {
* @return the list of entities
* @throws IOException if the list operation fails
*/
<E extends Entity & HasIdentifier> List<E> list(
Namespace namespace, Class<E> type, EntityType entityType) throws IOException;
default <E extends Entity & HasIdentifier> List<E> list(
Namespace namespace, Class<E> type, EntityType entityType) throws IOException {
return list(namespace, type, entityType, Collections.emptyList());
}

/**
* List all the entities with the specified {@link org.apache.gravitino.Namespace}, and
Expand Down

0 comments on commit 1707153

Please sign in to comment.