tag:github.com,2008:https://github.com/maxmind/GeoIP2-java/releasesRelease notes from GeoIP2-java2025-12-08T16:14:26Ztag:github.com,2008:Repository/9156682/v5.0.22025-12-08T16:14:48Z5.0.2<ul>
<li>Fixed an issue where decoding <code>IpRiskResponse</code> from the IP Risk database would<br>
fail when the <code>ip_risk</code> field was not present in the database record. The<br>
<code>ipRisk</code> field now defaults to 0.0 when not present. A value of 0.0 indicates<br>
that the risk score was not set in the database. In a future major release,<br>
this field may be changed to a nullable <code>Double</code> to better distinguish between<br>
"no data" and "zero risk". Reported by Fabrice Bacchella. GitHub <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3699784523" data-permission-text="Title is private" data-url="https://github.com/maxmind/GeoIP2-java/issues/644" data-hovercard-type="issue" data-hovercard-url="/maxmind/GeoIP2-java/issues/644/hovercard" href="https://github.com/maxmind/GeoIP2-java/issues/644">#644</a>.</li>
<li>Updated <code>maxmind-db</code> dependency to 4.0.2. This fixes a bug where enums with<br>
<code>@MaxMindDbCreator</code> would throw <code>ConstructorNotFoundException</code> when the data<br>
was stored via a pointer in the database, commonly occurring with deduplicated<br>
data in larger databases. It also improves error messages when constructor<br>
invocation fails. Reported by Fabrice Bacchella. GitHub <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3699784523" data-permission-text="Title is private" data-url="https://github.com/maxmind/GeoIP2-java/issues/644" data-hovercard-type="issue" data-hovercard-url="/maxmind/GeoIP2-java/issues/644/hovercard" href="https://github.com/maxmind/GeoIP2-java/issues/644">#644</a>.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/v5.0.12025-12-02T18:40:59Z5.0.1<ul>
<li>Updated <code>maxmind-db</code> dependency to 4.0.1. This makes <code>DecodedValue</code> public<br>
again, allowing custom <code>NodeCache</code> implementations to be created. GitHub<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3674722066" data-permission-text="Title is private" data-url="https://github.com/maxmind/GeoIP2-java/issues/636" data-hovercard-type="issue" data-hovercard-url="/maxmind/GeoIP2-java/issues/636/hovercard" href="https://github.com/maxmind/GeoIP2-java/issues/636">#636</a>.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/v5.0.02025-11-20T17:27:32Z5.0.0<ul>
<li><strong>BREAKING:</strong> All model and record classes have been converted to Java records.<br>
This provides a more modern, immutable data model with automatic implementations<br>
of <code>equals()</code>, <code>hashCode()</code>, and <code>toString()</code>. The abstract classes<br>
<code>AbstractRecord</code>, <code>AbstractNamedRecord</code>, <code>AbstractResponse</code>,<br>
<code>AbstractCountryResponse</code>, <code>AbstractCityResponse</code>, and <code>IpBaseResponse</code> have<br>
been removed. Record components can be accessed using the new accessor methods<br>
(e.g., <code>city()</code>, <code>country()</code>, <code>location()</code>). The traditional getter methods<br>
(e.g., <code>getCity()</code>, <code>getCountry()</code>, <code>getLocation()</code>) are still available but<br>
have been deprecated and will be removed in version 6.0.0.</li>
<li><strong>BREAKING:</strong> <code>RepresentedCountry</code> is now a separate record type instead of<br>
extending <code>Country</code>. It shares the same fields as <code>Country</code> but adds a <code>type</code><br>
field.</li>
<li>The deprecation notices for IP Risk database support have been removed.<br>
IP Risk database support will continue to be maintained.</li>
<li>A new <code>Anonymizer</code> record has been added to the <code>InsightsResponse</code> model. This<br>
record consolidates anonymizer information including VPN confidence scores,<br>
network last seen dates, and provider names. It includes the following fields:<br>
<code>confidence</code>, <code>isAnonymous</code>, <code>isAnonymousVpn</code>, <code>isHostingProvider</code>,<br>
<code>isPublicProxy</code>, <code>isResidentialProxy</code>, <code>isTorExitNode</code>, <code>networkLastSeen</code>, and<br>
<code>providerName</code>.</li>
<li>A new <code>ipRiskSnapshot</code> field has been added to the <code>Traits</code> record. This field<br>
provides a static risk score (ranging from 0.01 to 99) associated with the IP<br>
address. This is available from the GeoIP2 Precision Insights web service.</li>
<li>The anonymous IP flags in the <code>Traits</code> record (<code>isAnonymous</code>, <code>isAnonymousVpn</code>,<br>
<code>isHostingProvider</code>, <code>isPublicProxy</code>, <code>isResidentialProxy</code>, and <code>isTorExitNode</code>)<br>
have been deprecated in favor of using the new <code>Anonymizer</code> record in the<br>
<code>InsightsResponse</code>. These fields will continue to work but will be removed in<br>
version 6.0.0.</li>
<li><strong>BREAKING:</strong> The deprecated <code>WebServiceClient.Builder</code> methods<br>
<code>connectTimeout(int)</code>, <code>readTimeout(int)</code>, and <code>proxy(Proxy)</code> have been<br>
removed. Use <code>connectTimeout(Duration)</code>, <code>requestTimeout(Duration)</code>, and<br>
<code>proxy(ProxySelector)</code> respectively.</li>
<li><strong>BREAKING:</strong> The deprecated <code>WebServiceClient.close()</code> method has been<br>
removed along with the <code>Closeable</code> interface implementation.</li>
<li><strong>BREAKING:</strong> The deprecated <code>getUrl()</code> methods in <code>HttpException</code> and<br>
<code>InvalidRequestException</code> have been removed. Use <code>getUri()</code> instead.</li>
<li><strong>BREAKING:</strong> The deprecated <code>Traits</code> constructors and methods<br>
<code>isAnonymousProxy()</code> and <code>isSatelliteProvider()</code> have been removed. Use the<br>
GeoIP2 Anonymous IP database for anonymous proxy detection instead.</li>
<li><strong>BREAKING:</strong> The deprecated <code>Location.getMetroCode()</code> method has been<br>
removed. Metro code values are no longer maintained.</li>
<li><strong>BREAKING:</strong> Java 11 support has been dropped. Java 17 or later is now required.</li>
<li><strong>BREAKING:</strong> Removed explicit <code>serialVersionUID</code> from all exception classes.<br>
Java will auto-generate serialVersionUID when needed, following modern practices.</li>
<li><strong>BREAKING:</strong> Removed no longer necessary <code>JacksonInject</code> annotations for<br>
<code>ip_address</code>, <code>network</code>, and <code>traits</code> from several classes. The<br>
<code>JsonInjector</code> class was removed.</li>
<li>Public getter methods in non-record classes (e.g., <code>DatabaseReader</code>,<br>
exception classes) have been renamed to follow the same naming convention as<br>
records (e.g., <code>metadata()</code> instead of <code>getMetadata()</code>). The old getter<br>
methods are still available but have been deprecated and will be removed in<br>
version 6.0.0.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/v4.4.02025-08-28T14:38:06Z4.4.0<ul>
<li><code>WebServiceClient.Builder</code> now has an <code>httpClient()</code> method to allow<br>
passing in a custom <code>HttpClient</code>.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/v4.3.12025-05-28T21:27:27Z4.3.1<ul>
<li>First release using Central Portal instead of Legacy OSSRH.</li>
<li>Dependency updates.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/v4.3.02025-05-05T19:50:28Z4.3.0<ul>
<li>Support for the GeoIP Anonymous Plus database has been added. To do a<br>
lookup in this database, use the <code>anonymousPlus</code> method on<br>
<code>DatabaseReader</code>.</li>
<li><code>getMetroCode</code> in the <code>Location</code> model has been deprecated. The code<br>
values are no longer being maintained.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/v4.2.12024-09-20T15:27:09Z4.2.1<ul>
<li>Dependency updates:
<ul>
<li><code>maxmind-db</code> was upgraded to 3.1.1.</li>
<li>Jackson was upgraded to 2.17.2.</li>
</ul>
</li>
<li>Added missing API documentation.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/geoip2-4.2.12024-02-27T19:43:14Zgeoip2-4.2.1<p>[maven-release-plugin] copy for tag geoip2-4.2.1</p>oschwaldtag:github.com,2008:Repository/9156682/v4.2.02023-12-05T18:51:21Z4.2.0<ul>
<li>A <code>WebServiceProvider</code> interface has been added to facilitate mocking of<br>
<code>WebServiceClient</code>. Requested by Evan Chrisinger. GitHub <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1923389120" data-permission-text="Title is private" data-url="https://github.com/maxmind/GeoIP2-java/issues/359" data-hovercard-type="issue" data-hovercard-url="/maxmind/GeoIP2-java/issues/359/hovercard" href="https://github.com/maxmind/GeoIP2-java/issues/359">#359</a>.</li>
<li>The GeoIP2 IP Risk database has been discontinued. Methods and classes<br>
related to it have been deprecated.</li>
<li>The <code>fromString</code> static method on the <code>ConnectionType</code> enum now has<br>
the <code>JsonCreator</code> annotation so that it is used when deserializing.<br>
This will prevent new additions in the future from causing a<br>
deserialization error.</li>
<li>The <code>isAnycast()</code> method was added to <code>com.maxmind.geoip2.record.Traits</code>.<br>
This returns <code>true</code> if the IP address belongs to an <a href="https://en.wikipedia.org/wiki/Anycast" rel="nofollow">anycast<br>
network</a>. This is available for the<br>
GeoIP2 Country, City Plus, and Insights web services and the GeoIP2 Country,<br>
City, and Enterprise databases.</li>
</ul>oschwaldtag:github.com,2008:Repository/9156682/v2.17.02023-11-21T18:10:30Z2.17.0<ul>
<li>Updated model classes with non-breaking changes from the 4.2.0<br>
branch. In particular, this fixes an issue deserializing the<br>
new <code>connection_type</code> from the GeoIP2 web services.</li>
<li>Updated Jackson and <code>maxmind-db</code> dependencies.</li>
</ul>oschwald