maxmind / MaxMind-DB-Reader-java

Java reader for the MaxMind DB format
https://maxmind.github.io/MaxMind-DB-Reader-java/
Apache License 2.0
114 stars 43 forks source link

Pass Type parameter through when loading via cache #76

Closed horgh closed 4 years ago

horgh commented 4 years ago

Previously the lack of this meant that we'd not decode to the expected type in cases such as List. This was because Type wasn't passed through given the call to decode() didn't include it.

This also now takes into account the class and type in the cache key, where previously we could behave return a different class than expected if deserializing into two different classes.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+1.4%) to 91.145% when pulling 4aa485814275dd80cda34ddcf562fdda6aee9cd9 on horgh/cache-generic-type into 42a25d4a5514f6c7caa456d683381629ca3443cd on development.