From 1992e84b83aa91a9c4ea17f591b73cdcf01f51a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:47:57 +0000 Subject: [PATCH 1/3] Bump com.puppycrawl.tools:checkstyle from 10.21.4 to 10.22.0 Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.21.4 to 10.22.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-10.21.4...checkstyle-10.22.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28f0f5ab..c2e6aad9 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ com.puppycrawl.tools checkstyle - 10.21.4 + 10.22.0 From 8d985f4a9fd029ba00fa5adf7515ee1bdd178106 Mon Sep 17 00:00:00 2001 From: William Storey Date: Tue, 1 Apr 2025 18:44:28 +0000 Subject: [PATCH 2/3] Strip whitespace --- src/main/java/com/maxmind/db/Networks.java | 6 +++--- src/main/java/com/maxmind/db/Reader.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/maxmind/db/Networks.java b/src/main/java/com/maxmind/db/Networks.java index b06dfffb..e76fd436 100644 --- a/src/main/java/com/maxmind/db/Networks.java +++ b/src/main/java/com/maxmind/db/Networks.java @@ -21,7 +21,7 @@ public final class Networks implements Iterator> { private final boolean includeAliasedNetworks; private final ByteBuffer buffer; /* Stores the buffer for Next() calls */ private final Class typeParameterClass; - + /** * Constructs a Networks instance. * @@ -30,7 +30,7 @@ public final class Networks implements Iterator> { * @param typeParameterClass The type of data returned by the iterator. * @throws ClosedDatabaseException Exception for a closed database. */ - Networks(Reader reader, boolean includeAliasedNetworks, Class typeParameterClass) + Networks(Reader reader, boolean includeAliasedNetworks, Class typeParameterClass) throws ClosedDatabaseException { this(reader, includeAliasedNetworks, new NetworkNode[]{}, typeParameterClass); } @@ -117,7 +117,7 @@ private boolean isInIpv4Subtree(byte[] ip) { } return true; } - + /** * hasNext prepares the next network for reading with the Network method. It * returns true if there is another network to be processed and false if there diff --git a/src/main/java/com/maxmind/db/Reader.java b/src/main/java/com/maxmind/db/Reader.java index 1b8b84b2..15609c95 100644 --- a/src/main/java/com/maxmind/db/Reader.java +++ b/src/main/java/com/maxmind/db/Reader.java @@ -205,7 +205,7 @@ int record = traverseResult[0]; * @throws ClosedDatabaseException Exception for a closed databased. * @throws InvalidDatabaseException Exception for an invalid database. */ - public Networks networks(Class typeParameterClass) throws + public Networks networks(Class typeParameterClass) throws InvalidNetworkException, ClosedDatabaseException, InvalidDatabaseException { return this.networks(false, typeParameterClass); } From b1b3727b2b3bc4075c156fe2a66bb162fb94d69c Mon Sep 17 00:00:00 2001 From: William Storey Date: Tue, 1 Apr 2025 18:49:53 +0000 Subject: [PATCH 3/3] Fix checkstyle config to work with breaking change in 10.22.0 https://github.com/checkstyle/checkstyle/issues/9280 --- checkstyle.xml | 4 ++-- src/main/java/com/maxmind/db/Networks.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index 285c8d11..b785fd2e 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -342,7 +342,7 @@ - + @@ -383,4 +383,4 @@ - \ No newline at end of file + diff --git a/src/main/java/com/maxmind/db/Networks.java b/src/main/java/com/maxmind/db/Networks.java index e76fd436..93913c60 100644 --- a/src/main/java/com/maxmind/db/Networks.java +++ b/src/main/java/com/maxmind/db/Networks.java @@ -168,8 +168,11 @@ public boolean hasNext() { } static class NetworkNode { + /** The IP address of the node. */ public byte[] ip; + /** The prefix of the node. */ public int prefix; + /** The node number. */ public int pointer; /**