MCPcopy Index your code
hub / github.com/graphql-java/graphql-java / assertNotEmpty

Method assertNotEmpty

src/main/java/graphql/Assert.java:118–123  ·  view source on GitHub ↗
(Collection<T> collection)

Source from the content-addressed store, hash-verified

116 }
117
118 public static <T> Collection<T> assertNotEmpty(Collection<T> collection) {
119 if (collection == null || collection.isEmpty()) {
120 throwAssert("collection must be not null and not empty");
121 }
122 return collection;
123 }
124
125 // @Contract("null,_-> fail")
126 public static <T> Collection<T> assertNotEmpty(Collection<T> collection, Supplier<String> msg) {

Callers 7

moveUpMethod · 0.80
GraphQLUnionTypeMethod · 0.80
GraphQLDirectiveMethod · 0.80
moveUpMethod · 0.80
moveUpMethod · 0.80
buildMethod · 0.80

Calls 3

throwAssertMethod · 0.95
getMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected