(String typeName, Map<String, List<Map<String, String>>> types, LinkedHashSet<String> deps)
| 2525 | } |
| 2526 | |
| 2527 | private static void collectDependencies(String typeName, Map<String, List<Map<String, String>>> types, LinkedHashSet<String> deps) { |
| 2528 | if (!types.containsKey(typeName) || deps.contains(typeName)) return; |
| 2529 | deps.add(typeName); |
| 2530 | for (Map<String, String> field : types.get(typeName)) { |
| 2531 | String fieldType = field.get("type"); |
| 2532 | // Strip array suffix |
| 2533 | int idx = fieldType.indexOf('['); |
| 2534 | if (idx >= 0) fieldType = fieldType.substring(0, idx); |
| 2535 | if (types.containsKey(fieldType)) { |
| 2536 | collectDependencies(fieldType, types, deps); |
| 2537 | } |
| 2538 | } |
| 2539 | } |
| 2540 | |
| 2541 | private static byte[] encodeData(String primaryType, Map<String, Object> data, Map<String, List<Map<String, String>>> types) { |
| 2542 | List<byte[]> chunks = new ArrayList<>(); |
no test coverage detected