DATAREDIS-955 - Fix collection initialization when reading nested structures with same name.

We now make sure to not falsely populate instances with null values from nested structures.

Original pull request: #452.
This commit is contained in:
Christoph Strobl
2019-05-21 12:20:45 +02:00
committed by Mark Paluch
parent 0a6e40f66d
commit db2e3bcae6
3 changed files with 38 additions and 1 deletions

View File

@@ -178,7 +178,7 @@ public class Bucket {
return keySet();
}
Pattern pattern = Pattern.compile("(" + Pattern.quote(path) + ")\\.\\[.*?\\]");
Pattern pattern = Pattern.compile("^(" + Pattern.quote(path) + ")\\.\\[.*?\\]");
Set<String> keys = new LinkedHashSet<>();
for (Map.Entry<String, byte[]> entry : data.entrySet()) {