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)
| 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. |
no test coverage detected