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/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 diff --git a/src/main/java/com/maxmind/db/Networks.java b/src/main/java/com/maxmind/db/Networks.java index b06dfffb..93913c60 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 @@ -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; /** 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); }