- Fixed an issue where decoding
IpRiskResponsefrom the IP Risk database would fail when theip_riskfield was not present in the database record. TheipRiskfield now defaults to 0.0 when not present. A value of 0.0 indicates that the risk score was not set in the database. In a future major release, this field may be changed to a nullableDoubleto better distinguish between "no data" and "zero risk". Reported by Fabrice Bacchella. GitHub #644. - Updated
maxmind-dbdependency to 4.0.2. This fixes a bug where enums with@MaxMindDbCreatorwould throwConstructorNotFoundExceptionwhen the data was stored via a pointer in the database, commonly occurring with deduplicated data in larger databases. It also improves error messages when constructor invocation fails. Reported by Fabrice Bacchella. GitHub #644.
- Updated
maxmind-dbdependency to 4.0.1. This makesDecodedValuepublic again, allowing customNodeCacheimplementations to be created. GitHub #636.
- BREAKING: All model and record classes have been converted to Java records.
This provides a more modern, immutable data model with automatic implementations
of
equals(),hashCode(), andtoString(). The abstract classesAbstractRecord,AbstractNamedRecord,AbstractResponse,AbstractCountryResponse,AbstractCityResponse, andIpBaseResponsehave been removed. Record components can be accessed using the new accessor methods (e.g.,city(),country(),location()). The traditional getter methods (e.g.,getCity(),getCountry(),getLocation()) are still available but have been deprecated and will be removed in version 6.0.0. - BREAKING:
RepresentedCountryis now a separate record type instead of extendingCountry. It shares the same fields asCountrybut adds atypefield. - The deprecation notices for IP Risk database support have been removed. IP Risk database support will continue to be maintained.
- A new
Anonymizerrecord has been added to theInsightsResponsemodel. This record consolidates anonymizer information including VPN confidence scores, network last seen dates, and provider names. It includes the following fields:confidence,isAnonymous,isAnonymousVpn,isHostingProvider,isPublicProxy,isResidentialProxy,isTorExitNode,networkLastSeen, andproviderName. - A new
ipRiskSnapshotfield has been added to theTraitsrecord. This field provides a static risk score (ranging from 0.01 to 99) associated with the IP address. This is available from the GeoIP2 Precision Insights web service. - The anonymous IP flags in the
Traitsrecord (isAnonymous,isAnonymousVpn,isHostingProvider,isPublicProxy,isResidentialProxy, andisTorExitNode) have been deprecated in favor of using the newAnonymizerrecord in theInsightsResponse. These fields will continue to work but will be removed in version 6.0.0. - BREAKING: The deprecated
WebServiceClient.BuildermethodsconnectTimeout(int),readTimeout(int), andproxy(Proxy)have been removed. UseconnectTimeout(Duration),requestTimeout(Duration), andproxy(ProxySelector)respectively. - BREAKING: The deprecated
WebServiceClient.close()method has been removed along with theCloseableinterface implementation. - BREAKING: The deprecated
getUrl()methods inHttpExceptionandInvalidRequestExceptionhave been removed. UsegetUri()instead. - BREAKING: The deprecated
Traitsconstructors and methodsisAnonymousProxy()andisSatelliteProvider()have been removed. Use the GeoIP2 Anonymous IP database for anonymous proxy detection instead. - BREAKING: The deprecated
Location.getMetroCode()method has been removed. Metro code values are no longer maintained. - BREAKING: Java 11 support has been dropped. Java 17 or later is now required.
- BREAKING: Removed explicit
serialVersionUIDfrom all exception classes. Java will auto-generate serialVersionUID when needed, following modern practices. - BREAKING: Removed no longer necessary
JacksonInjectannotations forip_address,network, andtraitsfrom several classes. TheJsonInjectorclass was removed. - Public getter methods in non-record classes (e.g.,
DatabaseReader, exception classes) have been renamed to follow the same naming convention as records (e.g.,metadata()instead ofgetMetadata()). The old getter methods are still available but have been deprecated and will be removed in version 6.0.0.
WebServiceClient.Buildernow has anhttpClient()method to allow passing in a customHttpClient.
- First release using Central Portal instead of Legacy OSSRH.
- Dependency updates.
- Support for the GeoIP Anonymous Plus database has been added. To do a
lookup in this database, use the
anonymousPlusmethod onDatabaseReader. getMetroCodein theLocationmodel has been deprecated. The code values are no longer being maintained.
- Dependency updates:
maxmind-dbwas upgraded to 3.1.1.- Jackson was upgraded to 2.17.2.
- Added missing API documentation.
- A
WebServiceProviderinterface has been added to facilitate mocking ofWebServiceClient. Requested by Evan Chrisinger. GitHub #359. - The GeoIP2 IP Risk database has been discontinued. Methods and classes related to it have been deprecated.
- The
fromStringstatic method on theConnectionTypeenum now has theJsonCreatorannotation so that it is used when deserializing. This will prevent new additions in the future from causing a deserialization error. - The
isAnycast()method was added tocom.maxmind.geoip2.record.Traits. This returnstrueif the IP address belongs to an anycast network. This is available for the GeoIP2 Country, City Plus, and Insights web services and the GeoIP2 Country, City, and Enterprise databases.
- Added
SATELLITEto theConnectionTypeenum.
com.maxmind.dbis now a transitive dependency of this Java module.
- This library is now a Java module.
- Added support for the GeoIP2 IP Risk database.
- Updated Jackson and
maxmind-dbdependencies.
- Updated Jackson dependencies to address CVE-2020-36518. Pull request by slunker. GitHub #306.
- Minor doc updates.
- Java 11 or greater is now required.
- Apache HttpClient has been replaced with
java.net.http.HttpClient. - The
close()method onWebServiceClientis now deprecated. It no longer does anything. - On
WebServiceClient.Builder:connectTimeout(int)has been deprecated in favor ofconnectTimeout(Duration).readTimeout(int)has been deprecated in favor ofrequestTimeout(Duration).proxy(Proxy)has been deprecated in favor ofproxy(ProxySelector).
- On
HttpExceptionandInvalidRequestException,getUrl()has been deprecated in favor ofgetUri(). Constructors that took aURLhave been replaced with the equivalent taking aURI. - Deprecated constructors on model and trait classes were removed.
- Model data types were updated to better reflect database data types. In
particular:
getGeoNameId()onCity,Continent,Country,RepresentedCountry, andSubdivisionnow returns aLongrather than anInteger.getAutonomousSystemNumber()onAsnResponseandTraitsnow returns aLongrather than anInteger.
- Added
JsonPropertyannotations togetMobileCountryCode()andgetMobileNetworkCode()so that it is possible to serialize the object as JSON and then deserialize without losing data.
- Support for mobile country code (MCC) and mobile network codes (MNC) was
added for the GeoIP2 ISP and Enterprise databases as well as the GeoIP2
City and Insights web services.
getMobileCountryCode()andgetMobileNetworkCode()were added tocom.maxmind.geoip2.model.IspResponsefor the GeoIP2 ISP database andcom.maxmind.geoip2.record.Traitsfor the Enterprise database and the GeoIP2 City and Insights web services. We expect this data to be available by late January, 2022. - Deprecated model constructors that exist for backwards compatibility. These constructors are not generally used by users of this library directly except perhaps when mocking the reader in tests.
- No changes since 2.15.0-rc1.
- The HTTP client now allows up to 20 connections to be active at once. Previously the limit was 2.
- Update
maxmind-dbdependency to a new version that no longer uses Jackson. This improves database lookup performance. - The
isResidentialProxy()method was added tocom.maxmind.geoip2.model.AnonymousIpResponseandcom.maxmind.geoip2.record.Traitsfor use with the Anonymous IP database and GeoIP2 Precision insights.
- Update
maxmind-dbdependency to reduce locking when being used from multiple threads and to improve the exceptions thrown on an invalid database. - Update Jackson dependencies.
- Update
maxmind-dbdependency to fix handling of long strings in the database. Reported by Dongmin Yu. GitHub #181. - Update Jackson dependencies.
- IMPORTANT: Java 8 is now required. If you need Java 7 support, please continue using 2.12.0.
DatabaseReadernow provides the methods that return anOptionalrather than throwing an exception when the record is not found in the database. These methods are prefixed with "try". Closes #28. Pull request by Luke Butters. GitHub #147.getNetwork()methods have been added to the various response models. These return acom.maxmind.db.Networkobject representing the largest network where all the fields besides the IP address are the same.- Updated documentation of anonymizer methods
isAnonymousVpn()andisHostingProvider()to be more descriptive. - The
DatabaseReadermethodscity()andcountry()can now be called on the Enterprise database and thecountry()method can be called on City databases. Request by Gergely Boromissza. GitHub #132. - New
getStaticIpScore()andgetUserCount()methods were added tocom.maxmind.geoip2.record.Traitsfor use with GeoIP2 Precision Insights. They represent a measure of how static or dynamic an IP address is, and an estimate of the number of users sharing a given address or network, respectively.
- Rename
userIdtoaccountIdin various places and support the future error codesACCOUNT_ID_REQUIREDandACCOUNT_ID_UNKNOWN.
- The web service client now correctly handles a proxy of
Proxy.NO_PROXY. - The
isInEuropeanUnion()method was added tocom.maxmind.geoip2.record.Country. This returnstrueif the country is a member state of the European Union.
- The following new anonymizer methods were added to
com.maxmind.geoip2.record.Traitsfor use with GeoIP2 Precision Insights:isAnonymous(),isAnonymousVpn(),isHostingProvider(),isPublicProxy(), andisTorExitNode().
- Added support for GeoLite2 ASN database.
- Update
maxmind-dbdependency to fixjackson-databindversion range issue. Closes GitHub #77. - Update most other dependencies.
- All changes included in 2.8.0-rc1.
- Updated documentation to clarify what the accuracy radius refers to.
- IMPORTANT: Java 7 is now required. If you need Java 6 support, please continue using 2.7.0 or earlier.
- This library no longer uses Google HTTP Client. It now directly uses Apache HttpClient. Closes #40, #66.
WebServiceClientnow implementsCloseable. A pool of connections will be kept alive to be used across requests. To ensure all connections are closed when the object goes out of scope, callclose()or use the try-with-resource statement as appropriate.- Setting of a proxy for the
WebServiceClientis now supported by theproxy(Proxy)builder method. - Updated documentation to reflect that the accuracy radius is now included in City.
- Updated dependencies.
- Added support for the GeoIP2 Enterprise database.
- This release was updated to 1.2.0 of the MaxMind DB reader, which includes faster caching with fewer allocations.
- The IP addresses in the database models are now injected via Jackson rather
than being added to the
JsonNodebefore deserialization. Pull requests by Viktor Szathmáry. GitHub #56.
- The database reader now supports pluggable caching of the decoded data. By
default, no caching is performed. Please see the
README.mdfile or the API docs for information on how to enable caching. Pull requests by Viktor Szathmáry. GitHub #55.
- Jackson now uses the constructors on model classes when mapping JSON and database records to them rather than overriding the access modifiers on them. Pull request by Martijn van Groningen. GitHub #51 & #52.
- The format of the output of the
toString()methods in the models has changed to better represent the values returned by the databases and web services.toString()should be only used for debugging and diagnostics. Do not try to parse it. If you want the contents of the model as a machine- readable string, usetoJson(). - This release depends on version 1.0.1 of the MaxMind DB reader, which includes several performance enhancements from by Viktor Szathmáry.
- No code changes in this release
- Fix for version number in pom.xml example in README.md
- Slight documentation improvement referring to MaxMind-DB-Reader-java
- Add support for the
average_incomeandpopulation_densityfields. - The
isAnonymousProxy()andisSatelliteProvider()methods oncom.maxmind.geoip2.record.Traitshave been deprecated. Please use our [GeoIP2 Anonymous IP database](https://www.maxmind.com/en/geoip2-anonymous- ip-database) to determine whether an IP address is used by an anonymizing service.
- A
DatabaseProviderinterface has been added to facilitate mocking ofDatabaseReader. Pull request by Yonatan Most. GitHub #34. - A
getLeastSpecificSubdivision()method has been added to theCityResponseandInsightsResponsemodel classes. This returns the least specific subdivision for the location, e.g., England for Oxford, GB. Pull request by Daniel Kaneider. GitHub #35. - The
InsightsResponseandLocationclasses are no longer declared final. AbstractResponseis now declaredabstract.
- Added support for the GeoIP2 Anonymous IP database. The
DatabaseReaderclass now has ananonymousIp()method which returns anAnonymousIpResponseobject.
- First production release.
- The deprecated
cityIspOrg()andomni()methods have been removed fromDatabaseReaderandWebServiceClient. - The lookup methods on
DatabaseReadernow throw anUnsupportedOperationExceptionif the incorrect method is used for the database. DatabaseReadernow provides the metadata for the database through thegetDatabase()method.- All of our dependencies were updated to the latest available version.
- The
timeoutsetter onWebServiceClient.Builderwas renamed toconnectTimeoutand areadTimeoutsetter was added. The former timeout sets the timeout to establish a connection and the latter sets the timeout for reading from an established connection.
- Updated to depend on the latest version of
com.maxmind.dbandcom.fasterxml.jackson.core.
- The web service client API has been updated for the v2.1 release of the web
service. In particular, the
cityIspOrgandomnimethods onWebServiceClienthave been deprecated. Thecitymethod now provides all of the data formerly provided bycityIspOrg, and theomnimethod has been replaced by theinsightsmethod. - Support was added for the GeoIP2 Connection Type, Domain, and ISP databases.
- Updated to version 0.3.3 of
maxmind-db, which fixes a potential resource leak when used with a thread pool. - Updated Google HTTP Client dependency.
- The Maven build was updated to include a zip file with all dependencies.
- Added
toJsonmethod to response objects. - Fixed a potential issue when using the
WebServiceClientin multi-threaded applications. - Updated documentation.
- Renamed
getSubdivisionsListtogetSubdivisionsonAbstractNamedRecord. - An
InputStreamconstructor was added to theDatabaseReader.Builderclass. This reads the stream into memory as if it was using theFileMode.MEMORYmode. Patch by Matthew Daniel. - The source code is now attached during packaging. Patch by Matthew Daniel.
- IMPORTANT API CHANGE: The
DatabaseReaderclass now uses a builder to construct the object. The class constructor onDatabaseReaderis no longer public. - Renamed the
languagesmethod on theWebServiceClient.Buildertolocales.
- Reorganized the response and record classes. The response classes end
with
Response. The record classes no longer end inRecord.
- Set the user-agent header to include API information.
- Updated documentation.
- Removed unused dependency from Maven POM.
- Removed class hierarchy among web-service endpoint models.
- Refactored database-reader API to more closely match the web-service API. Created a Java interface for the two classes.
- Reorganized the classes.
Clientwas renamedWebServiceClientand moved tocom.maxmind.geoip2. Record classes now have a suffix of "Record". The product classes (e.g., Omni) were renamed to their product name with no "Lookup" suffix. - Additional specific exceptions were added to replace the general
WebServiceException. - A
DatabaseReaderclass was added to the distribution. This reads GeoIP2 databases and returns similar product object toWebServiceClient.
- Replaced the public constructor on
Clientwith aBuilderclass.
- First official beta release.
- Documentation updates and corrections.
- Changed license to Apache License, Version 2.0.
- Initial release