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

Explicitly make the ByteBuffer content readonly #71

Closed spkrka closed 4 years ago

spkrka commented 4 years ago

This does not change any behaviour, but it would prevent bugs in the future if something tries to write to the buffer.

If fileMode is MEMORY_MAPPED, this would already fail, so this extra protection only really applies to the MEMORY mode.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.06%) to 90.939% when pulling b09b1eecd0a7c95be28eca772357e6b4f5dde752 on spkrka:krka/buf_readonly into a7eaec635dc2fea4c91e3af0bba54f1a144f5592 on maxmind:master.