Fix missing objects when using multiple files
This commit is contained in:
parent
820c3bc83a
commit
2d442c390c
|
@ -14,11 +14,10 @@ public class TLReader {
|
|||
|
||||
public static void readTlObjects(final Map<String, List<TLObject>> result, final File file) {
|
||||
for (final Map.Entry<String, List<String>> entry : readTl(file).entrySet()) {
|
||||
final List<TLObject> objects = new ArrayList<>();
|
||||
final List<TLObject> objects = result.computeIfAbsent(entry.getKey(), k -> new ArrayList<>());
|
||||
for (final String string : entry.getValue()) {
|
||||
objects.add(TLObject.fromString(string));
|
||||
}
|
||||
result.put(entry.getKey(), objects);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue