This is a major release with several breaking changes. Please see
UPGRADING.md for detailed migration instructions.
- Java 17 or greater is now required.
- Added support for MaxMind DB files larger than 2GB. The library now uses
an internal Buffer abstraction that can handle databases exceeding the
2GB ByteBuffer limit. Files under 2GB continue to use a single ByteBuffer
for optimal performance. Requested by nonetallt. GitHub #154. Fixed by
Silvano Cerza. GitHub #289. Metadata.getBuildDate()has been replaced withbuildTime(), which returns
java.time.Instantinstead ofjava.util.Date. The instant represents the
database build time in UTC.DatabaseRecord,Metadata,Network, and internalDecodedValueclasses
have been converted to records. The following API changes were made:DatabaseRecord.getData()andDatabaseRecord.getNetwork()have been
replaced with record accessor methodsdata()andnetwork().- Simple getter methods on
Metadata(e.g.,getBinaryFormatMajorVersion(),
getDatabaseType(), etc.) have been replaced with their corresponding record
accessor methods (e.g.,binaryFormatMajorVersion(),databaseType(), etc.). Network.getNetworkAddress()andNetwork.getPrefixLength()have been
replaced with record accessor methodsnetworkAddress()andprefixLength().- Removed the legacy
DatabaseRecord(T, InetAddress, int)constructor; pass a
Networkwhen constructing records manually.
- Deserialization improvements:
- If no constructor is annotated with
@MaxMindDbConstructor, records now
use their canonical constructor automatically. For non‑record classes with
a single public constructor, that constructor is used by default. @MaxMindDbParameterannotations are now optional when parameter names
match field names in the database: for records, component names are used;
for classes, Java parameter names are used (when compiled with
-parameters). Annotations still take precedence when present.- Added
@MaxMindDbIpAddressand@MaxMindDbNetworkannotations to inject
the lookup IP address and resulting network into constructors. Annotation
metadata is cached per type to avoid repeated reflection overhead.
- If no constructor is annotated with