MCPcopy Create free account
hub / github.com/grpc/grpc-java / getListOfStrings

Method getListOfStrings

core/src/main/java/io/grpc/internal/JsonUtil.java:70–77  ·  view source on GitHub ↗

Gets a list from an object for the given key, and verifies all entries are strings. If the key is not present, this returns null. If the value is not a List or an entry is not a string, throws an exception.

(Map<String, ?> obj, String key)

Source from the content-addressed store, hash-verified

68 * throws an exception.
69 */
70 @Nullable
71 public static List<String> getListOfStrings(Map<String, ?> obj, String key) {
72 List<?> list = getList(obj, key);
73 if (list == null) {
74 return null;
75 }
76 return checkStringList(list);
77 }
78
79 /**
80 * Gets an object from an object for the given key. If the key is not present, this returns null.

Callers 8

extractCertMethod · 0.95
parseSourceMethod · 0.95
parseHeaderMethod · 0.95
parseRequestMethod · 0.95
parseJsonLogFilterMethod · 0.95

Calls 2

getListMethod · 0.95
checkStringListMethod · 0.95

Tested by

no test coverage detected