Mistři v programování na #hovnokod

Java #70

private Map<Class<?>, Map<String, String[]>> compressDependencies(
      Map<Class<?>, Map<String, List<String>>> dependencies) {
    final Map<Class<?>, Map<String, String[]>> result =
        new FastMap<Class<?>, Map<String, String[]>>(dependencies.size());
    final Set<Entry<Class<?>, Map<String, List<String>>>> entrySet = dependencies.entrySet();
    for (Entry<Class<?>, Map<String, List<String>>> entry : entrySet) {
      final Map<String, List<String>> value = entry.getValue();
      final Map<String, String[]> desc = new FastMap<String, String[]>(value.size());
      final Set<Entry<String, List<String>>> subEntries = value.entrySet();
      for (Entry<String, List<String>> valueEntry : subEntries) {
        final List<String> list = valueEntry.getValue();
        if (list != null && !list.isEmpty()) {
          desc.put(valueEntry.getKey(), list.toArray(new String[list.size()]));
        }
      }
      result.put(entry.getKey(), desc);
    }
    return result;
  }

Anonymous,