Skip to content

Commit 7ffeb5a

Browse files
authored
Merge pull request #620 from maxmind/greg/eng-3230
Modernization changes for new major version
2 parents e532da4 + 5218189 commit 7ffeb5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2638
-2277
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ CHANGELOG
44
5.0.0
55
------------------
66

7+
* **BREAKING:** All model and record classes have been converted to Java records.
8+
This provides a more modern, immutable data model with automatic implementations
9+
of `equals()`, `hashCode()`, and `toString()`. The abstract classes
10+
`AbstractRecord`, `AbstractNamedRecord`, `AbstractResponse`,
11+
`AbstractCountryResponse`, `AbstractCityResponse`, and `IpBaseResponse` have
12+
been removed. Record components can be accessed using the new accessor methods
13+
(e.g., `city()`, `country()`, `location()`). The traditional getter methods
14+
(e.g., `getCity()`, `getCountry()`, `getLocation()`) are still available but
15+
have been deprecated and will be removed in version 6.0.0.
16+
* **BREAKING:** `RepresentedCountry` is now a separate record type instead of
17+
extending `Country`. It shares the same fields as `Country` but adds a `type`
18+
field.
719
* The deprecation notices for IP Risk database support have been removed.
820
IP Risk database support will continue to be maintained.
921
* **BREAKING:** The deprecated `WebServiceClient.Builder` methods
@@ -25,6 +37,11 @@ CHANGELOG
2537
* **BREAKING:** Removed no longer necessary `JacksonInject` annotations for
2638
`ip_address`, `network`, and `traits` from several classes. The
2739
`JsonInjector` class was removed.
40+
* Public getter methods in non-record classes (e.g., `DatabaseReader`,
41+
exception classes) have been renamed to follow the same naming convention as
42+
records (e.g., `metadata()` instead of `getMetadata()`). The old getter
43+
methods are still available but have been deprecated and will be removed in
44+
version 6.0.0.
2845

2946
4.4.0 (2025-08-28)
3047
------------------

pom.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.maxmind.geoip2</groupId>
55
<artifactId>geoip2</artifactId>
6-
<version>4.4.0</version>
6+
<version>5.0.0-SNAPSHOT</version>
77
<packaging>jar</packaging>
88
<name>MaxMind GeoIP2 API</name>
99
<description>GeoIP2 webservice client and database reader</description>
@@ -36,11 +36,24 @@
3636
<email>[email protected]</email>
3737
</developer>
3838
</developers>
39+
<repositories>
40+
<repository>
41+
<name>Central Portal Snapshots</name>
42+
<id>central-portal-snapshots</id>
43+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
44+
<releases>
45+
<enabled>false</enabled>
46+
</releases>
47+
<snapshots>
48+
<enabled>true</enabled>
49+
</snapshots>
50+
</repository>
51+
</repositories>
3952
<dependencies>
4053
<dependency>
4154
<groupId>com.maxmind.db</groupId>
4255
<artifactId>maxmind-db</artifactId>
43-
<version>3.2.0</version>
56+
<version>4.0.0-SNAPSHOT</version>
4457
</dependency>
4558
<dependency>
4659
<groupId>com.fasterxml.jackson.core</groupId>
@@ -294,10 +307,4 @@
294307
</build>
295308
</profile>
296309
</profiles>
297-
<distributionManagement>
298-
<repository>
299-
<id>sonatype-nexus-staging</id>
300-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
301-
</repository>
302-
</distributionManagement>
303310
</project>

0 commit comments

Comments
 (0)