getMetroCode
in theLocation
model has been deprecated. The code values are no longer being maintained.
- Dependency updates:
maxmind-db
was upgraded to 3.1.1.- Jackson was upgraded to 2.17.2.
- Added missing API documentation.
- A
WebServiceProvider
interface 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
fromString
static method on theConnectionType
enum now has theJsonCreator
annotation 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 returnstrue
if 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
SATELLITE
to theConnectionType
enum.
com.maxmind.db
is 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-db
dependencies.
- 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 onWebServiceClient
is 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
HttpException
andInvalidRequestException
,getUrl()
has been deprecated in favor ofgetUri()
. Constructors that took aURL
have 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
, andSubdivision
now returns aLong
rather than anInteger
.getAutonomousSystemNumber()
onAsnResponse
andTraits
now returns aLong
rather than anInteger
.
- Added
JsonProperty
annotations 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.IspResponse
for the GeoIP2 ISP database andcom.maxmind.geoip2.record.Traits
for 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-db
dependency to a new version that no longer uses Jackson. This improves database lookup performance. - The
isResidentialProxy()
method was added tocom.maxmind.geoip2.model.AnonymousIpResponse
andcom.maxmind.geoip2.record.Traits
for use with the Anonymous IP database and GeoIP2 Precision insights.
- Update
maxmind-db
dependency to reduce locking when being used from multiple threads and to improve the exceptions thrown on an invalid database. - Update Jackson dependencies.
- Update
maxmind-db
dependency 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.
DatabaseReader
now provides the methods that return anOptional
rather 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.Network
object 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
DatabaseReader
methodscity()
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.Traits
for 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
userId
toaccountId
in various places and support the future error codesACCOUNT_ID_REQUIRED
andACCOUNT_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 returnstrue
if the country is a member state of the European Union.
- The following new anonymizer methods were added to
com.maxmind.geoip2.record.Traits
for use with GeoIP2 Precision Insights:isAnonymous()
,isAnonymousVpn()
,isHostingProvider()
,isPublicProxy()
, andisTorExitNode()
.
- Added support for GeoLite2 ASN database.
- Update
maxmind-db
dependency to fixjackson-databind
version 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.
WebServiceClient
now 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
WebServiceClient
is 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
JsonNode
before 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.md
file 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_income
andpopulation_density
fields. - The
isAnonymousProxy()
andisSatelliteProvider()
methods oncom.maxmind.geoip2.record.Traits
have 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
DatabaseProvider
interface has been added to facilitate mocking ofDatabaseReader
. Pull request by Yonatan Most. GitHub #34. - A
getLeastSpecificSubdivision()
method has been added to theCityResponse
andInsightsResponse
model classes. This returns the least specific subdivision for the location, e.g., England for Oxford, GB. Pull request by Daniel Kaneider. GitHub #35. - The
InsightsResponse
andLocation
classes are no longer declared final. AbstractResponse
is now declaredabstract
.
- Added support for the GeoIP2 Anonymous IP database. The
DatabaseReader
class now has ananonymousIp()
method which returns anAnonymousIpResponse
object.
- First production release.
- The deprecated
cityIspOrg()
andomni()
methods have been removed fromDatabaseReader
andWebServiceClient
. - The lookup methods on
DatabaseReader
now throw anUnsupportedOperationException
if the incorrect method is used for the database. DatabaseReader
now provides the metadata for the database through thegetDatabase()
method.- All of our dependencies were updated to the latest available version.
- The
timeout
setter onWebServiceClient.Builder
was renamed toconnectTimeout
and areadTimeout
setter 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.db
andcom.fasterxml.jackson.core
.
- The web service client API has been updated for the v2.1 release of the web
service. In particular, the
cityIspOrg
andomni
methods onWebServiceClient
have been deprecated. Thecity
method now provides all of the data formerly provided bycityIspOrg
, and theomni
method has been replaced by theinsights
method. - 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
toJson
method to response objects. - Fixed a potential issue when using the
WebServiceClient
in multi-threaded applications. - Updated documentation.
- Renamed
getSubdivisionsList
togetSubdivisions
onAbstractNamedRecord
. - An
InputStream
constructor was added to theDatabaseReader.Builder
class. This reads the stream into memory as if it was using theFileMode.MEMORY
mode. Patch by Matthew Daniel. - The source code is now attached during packaging. Patch by Matthew Daniel.
- IMPORTANT API CHANGE: The
DatabaseReader
class now uses a builder to construct the object. The class constructor onDatabaseReader
is no longer public. - Renamed the
languages
method on theWebServiceClient.Builder
tolocales
.
- 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.
Client
was renamedWebServiceClient
and 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
DatabaseReader
class was added to the distribution. This reads GeoIP2 databases and returns similar product object toWebServiceClient
.
- Replaced the public constructor on
Client
with aBuilder
class.
- First official beta release.
- Documentation updates and corrections.
- Changed license to Apache License, Version 2.0.
- Initial release