(Object obj)
| 1355 | } |
| 1356 | |
| 1357 | public static List<Object> unique(Object obj) { |
| 1358 | if (!(obj instanceof List<?> list)) { |
| 1359 | return null; // not a []string equivalent |
| 1360 | } |
| 1361 | |
| 1362 | // ensure it's actually a List<String> |
| 1363 | for (Object e : list) { |
| 1364 | if (!(e instanceof String)) { |
| 1365 | return null; |
| 1366 | } |
| 1367 | } |
| 1368 | |
| 1369 | // preserve order while deduplicating |
| 1370 | var seen = new LinkedHashSet<Object>(); |
| 1371 | for (Object e : list) { |
| 1372 | seen.add((String) e); |
| 1373 | } |
| 1374 | return new ArrayList<Object>(seen); |
| 1375 | } |
| 1376 | |
| 1377 | public int parseTimeframe(Object timeframe2) { |
| 1378 | if (timeframe2 == null) { |
no test coverage detected