While using this library with ordered sets, I encountered a critical bug that would silently permute values because sets would be saved in order but loaded in random order! This was particularly bad for storing large keys, broken down into chunks. When restored, the values would change!! What made it so bad is that it would often work because sometimes the random order would match the initial order. So it got through several layers of testing, unnoticed.
This PR addresses the root issue by adding support for storing lists. Since Lists are inherently ordered, they are a more attractive option for developers who are breaking down large strings for storage. Also, the getStringSetValue function has been modified to use a LinkedHashSet under the hood, which is a non-breaking change but also makes it compatible with ordered sets.
Along the way, I encountered other bugs that I documented as github issues and fixed, as well. Lastly, I added unit tests in the style of existing tests to verify all new functionality.
While using this library with ordered sets, I encountered a critical bug that would silently permute values because sets would be saved in order but loaded in random order! This was particularly bad for storing large keys, broken down into chunks. When restored, the values would change!! What made it so bad is that it would often work because sometimes the random order would match the initial order. So it got through several layers of testing, unnoticed.
This PR addresses the root issue by adding support for storing lists. Since Lists are inherently ordered, they are a more attractive option for developers who are breaking down large strings for storage. Also, the
getStringSetValue
function has been modified to use a LinkedHashSet under the hood, which is a non-breaking change but also makes it compatible with ordered sets.Along the way, I encountered other bugs that I documented as github issues and fixed, as well. Lastly, I added unit tests in the style of existing tests to verify all new functionality.
All tests pass.