From 70140ff77a328755cf37f92fb84247d0cf593243 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 2 Dec 2025 10:25:19 -0800 Subject: [PATCH 1/3] Make DecodeValue a public class again `DecodedValue` is now a public class again, allowing custom `NodeCache` implementations to be created. The class was inadvertently made package-private in 4.0.0. Fixes #321. --- CHANGELOG.md | 7 +++++++ src/main/java/com/maxmind/db/DecodedValue.java | 17 ++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ddc15ff..8cbb2519 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +4.0.1 (2025-12-02) +------------------ + +* `DecodedValue` is now a public class again, allowing custom `NodeCache` + implementations to be created. The class was inadvertently made + package-private in 4.0.0. Reported by Alexandros Leventakis. GitHub #321. + 4.0.0 (2025-11-10) ------------------ diff --git a/src/main/java/com/maxmind/db/DecodedValue.java b/src/main/java/com/maxmind/db/DecodedValue.java index c3174f69..5440a684 100644 --- a/src/main/java/com/maxmind/db/DecodedValue.java +++ b/src/main/java/com/maxmind/db/DecodedValue.java @@ -1,9 +1,16 @@ package com.maxmind.db; /** - * {@code DecodedValue} is a wrapper for the decoded value and the number of bytes used - * to decode it. - * - * @param value the decoded value + * {@code DecodedValue} is a wrapper for the decoded value. */ -record DecodedValue(Object value) {} +public final class DecodedValue { + final Object value; + + DecodedValue(Object value) { + this.value = value; + } + + Object value() { + return value; + } +} From b3c17b5965f9c649e76fd81b7df3fe1c7da80aa4 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 2 Dec 2025 10:35:32 -0800 Subject: [PATCH 2/3] Add more files to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 828d6af0..3f1c943f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.ear *.sw? *.classpath +.claude .gh-pages .idea .pmd @@ -14,6 +15,7 @@ bin doc hs_err*.log +pom.xml.versionsBackup target /sample/GeoLite2-City.mmdb /sample/run.sh From e2b0184d2b72de5c60c53d8f090bf2c28e26fb0f Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 2 Dec 2025 10:36:57 -0800 Subject: [PATCH 3/3] Preparing for 4.0.1 --- README.md | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7197ef5c..707f5a7a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ To do this, add the dependency to your pom.xml: com.maxmind.db maxmind-db - 4.0.0 + 4.0.1 ``` @@ -29,7 +29,7 @@ repositories { mavenCentral() } dependencies { - compile 'com.maxmind.db:maxmind-db:4.0.0' + compile 'com.maxmind.db:maxmind-db:4.0.1' } ``` diff --git a/pom.xml b/pom.xml index 57f4494e..6b3de5ef 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.maxmind.db maxmind-db - 4.0.0 + 4.0.1 jar MaxMind DB Reader Reader for MaxMind DB