diff --git a/README.md b/README.md index 396209fa..eb52de18 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,24 @@ Maven, you must Failure to do so will result in `InvalidDatabaseException` exceptions being thrown when querying the database. +### File Lock on Windows ### + +By default, the `DatabaseReader` uses the `MEMORY_MAPPED` file mode, which +memory maps the database file. On Windows, a live memory mapping may prevent +the file from being renamed, replaced, or deleted. This is not a Java +`FileLock`, but it can have similar effects when updating a database file in +place. + +Closing the `DatabaseReader` releases its reference to the mapped buffer, but +Java does not provide a supported way to unmap the underlying +`MappedByteBuffer` immediately. The mapping remains valid until the buffer +becomes unreachable and is garbage collected. + +To avoid this behavior, configure the `Builder` with `FileMode.MEMORY`. If you +must use `MEMORY_MAPPED`, close and dereference the `DatabaseReader` before +replacing the file. You may call `System.gc()` to encourage earlier cleanup, +but garbage collection is not guaranteed to run immediately. + ## Database Example ## ### City ### diff --git a/lychee.toml b/lychee.toml index d8993aad..93a3f6a0 100644 --- a/lychee.toml +++ b/lychee.toml @@ -5,7 +5,7 @@ # lychee './**/*.md' './src/**/*.java' './pom.xml' # Include URL fragments in checks -include_fragments = true +include_fragments = "full" # Don't allow any redirects, so links that have moved are surfaced and updated # to their canonical destination. diff --git a/mise.lock b/mise.lock index 18a10c6d..0bdccfe6 100644 --- a/mise.lock +++ b/mise.lock @@ -1,110 +1,104 @@ # @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html [[tools.hugo]] -version = "0.161.1" +version = "0.163.3" backend = "aqua:gohugoio/hugo" [tools.hugo."platforms.linux-arm64"] -checksum = "sha256:382371ec3208236fb854ced51781f859b6c27a7d066b8fe90594eba14ba76d00" -url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-arm64.tar.gz" +checksum = "sha256:a4185cf0308ff3a61a2828563f70f476fcef30d02e9b00fb562eb1bd085195a5" +url = "https://github.com/gohugoio/hugo/releases/download/v0.163.3/hugo_0.163.3_linux-arm64.tar.gz" [tools.hugo."platforms.linux-arm64-musl"] -checksum = "sha256:382371ec3208236fb854ced51781f859b6c27a7d066b8fe90594eba14ba76d00" -url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-arm64.tar.gz" +checksum = "sha256:a4185cf0308ff3a61a2828563f70f476fcef30d02e9b00fb562eb1bd085195a5" +url = "https://github.com/gohugoio/hugo/releases/download/v0.163.3/hugo_0.163.3_linux-arm64.tar.gz" [tools.hugo."platforms.linux-x64"] -checksum = "sha256:fae28bf7909c1a42d1365b89d2e9e3d4194fbe5968ae0dd5504f562381018a1d" -url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-amd64.tar.gz" +checksum = "sha256:ec422258f9a4ffc241de8707297e32311cd86fcc9b2813632617ff4d44935d91" +url = "https://github.com/gohugoio/hugo/releases/download/v0.163.3/hugo_0.163.3_linux-amd64.tar.gz" [tools.hugo."platforms.linux-x64-musl"] -checksum = "sha256:fae28bf7909c1a42d1365b89d2e9e3d4194fbe5968ae0dd5504f562381018a1d" -url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_linux-amd64.tar.gz" +checksum = "sha256:ec422258f9a4ffc241de8707297e32311cd86fcc9b2813632617ff4d44935d91" +url = "https://github.com/gohugoio/hugo/releases/download/v0.163.3/hugo_0.163.3_linux-amd64.tar.gz" [tools.hugo."platforms.macos-arm64"] -checksum = "sha256:b12e1cbebacf61f9cf67e0046c835142e70c829da7c16b05c1ec64a68885ee80" -url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_darwin-universal.pkg" +checksum = "sha256:a59f749a6dbf613da9ec9c51ab670add0ca72b7eed6590bbff779a6fd6b70f0c" +url = "https://github.com/gohugoio/hugo/releases/download/v0.163.3/hugo_0.163.3_darwin-universal.pkg" [tools.hugo."platforms.macos-x64"] -checksum = "sha256:b12e1cbebacf61f9cf67e0046c835142e70c829da7c16b05c1ec64a68885ee80" -url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_darwin-universal.pkg" +checksum = "sha256:a59f749a6dbf613da9ec9c51ab670add0ca72b7eed6590bbff779a6fd6b70f0c" +url = "https://github.com/gohugoio/hugo/releases/download/v0.163.3/hugo_0.163.3_darwin-universal.pkg" [tools.hugo."platforms.windows-x64"] -checksum = "sha256:7f8d030b37600c60bf2a782611257e6a768934fbe7724c1f3a1a501e6724cf0d" -url = "https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_0.161.1_windows-amd64.zip" +checksum = "sha256:f330476374b604d3bc0e33a929ff476e9623bc62938f16846e832620545cd705" +url = "https://github.com/gohugoio/hugo/releases/download/v0.163.3/hugo_0.163.3_windows-amd64.zip" [[tools.java]] version = "26.0.1" backend = "core:java" -[tools.java."platforms.linux-arm64"] -checksum = "sha256:12a3649b2f4a0c9f6491d220bdd04b4fff07cae502b435aaff46eac0e36f4df1" -url = "https://download.java.net/java/GA/jdk26.0.1/458fda22e4c54d5ba572ab8d2b22eb83/8/GPL/openjdk-26.0.1_linux-aarch64_bin.tar.gz" - -[tools.java."platforms.linux-x64"] -checksum = "sha256:2f2802d57b5fc414f1ddf6648ba12cc9a6454cf67b32ac95407c018f2e6ab0b0" -url = "https://download.java.net/java/GA/jdk26.0.1/458fda22e4c54d5ba572ab8d2b22eb83/8/GPL/openjdk-26.0.1_linux-x64_bin.tar.gz" - -[tools.java."platforms.macos-arm64"] -checksum = "sha256:b2d57405194a312ed4ec6ec08e83b314d3fd2e425e895d704ec5ef8ea6059e17" -url = "https://download.java.net/java/GA/jdk26.0.1/458fda22e4c54d5ba572ab8d2b22eb83/8/GPL/openjdk-26.0.1_macos-aarch64_bin.tar.gz" - -[tools.java."platforms.macos-x64"] -checksum = "sha256:e52bc05aefe4991329a6a103c9b42ae4b9b77240a9f9d3d12f6a7365db1ae16a" -url = "https://download.java.net/java/GA/jdk26.0.1/458fda22e4c54d5ba572ab8d2b22eb83/8/GPL/openjdk-26.0.1_macos-x64_bin.tar.gz" - -[tools.java."platforms.windows-x64"] -checksum = "sha256:b381d30647aed9ff440abed5ab61af01d8578c290cd407c57e064ebc4b0151be" -url = "https://download.java.net/java/GA/jdk26.0.1/458fda22e4c54d5ba572ab8d2b22eb83/8/GPL/openjdk-26.0.1_windows-x64_bin.zip" +[tools.java.options] +shorthand_vendor = "openjdk" [[tools.lychee]] -version = "0.23.0" +version = "0.24.2" backend = "aqua:lycheeverse/lychee" [tools.lychee."platforms.linux-arm64"] -checksum = "sha256:97eb93b02a7d78a752fc33e5b0983439ccaadbf3db952b68a0a4401acd92e6e0" -url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.23.0/lychee-aarch64-unknown-linux-gnu.tar.gz" +checksum = "sha256:5d0b0e3aeab240f41920c633a6eaf97599be6eedda034b36e858ede7dba5e535" +url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.24.2/lychee-aarch64-unknown-linux-musl.tar.gz" [tools.lychee."platforms.linux-arm64-musl"] -checksum = "sha256:97eb93b02a7d78a752fc33e5b0983439ccaadbf3db952b68a0a4401acd92e6e0" -url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.23.0/lychee-aarch64-unknown-linux-gnu.tar.gz" +checksum = "sha256:5d0b0e3aeab240f41920c633a6eaf97599be6eedda034b36e858ede7dba5e535" +url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.24.2/lychee-aarch64-unknown-linux-musl.tar.gz" [tools.lychee."platforms.linux-x64"] -checksum = "sha256:5538440d2c69a45a0a09983271e5dee0c2fe7137d8035d25b2632e10a66a090a" -url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.23.0/lychee-x86_64-unknown-linux-musl.tar.gz" +checksum = "sha256:73657a111819a30c47c08352896796f23d64e4eb2b3ed39b6d32149241566fc5" +url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.24.2/lychee-x86_64-unknown-linux-musl.tar.gz" [tools.lychee."platforms.linux-x64-musl"] -checksum = "sha256:5538440d2c69a45a0a09983271e5dee0c2fe7137d8035d25b2632e10a66a090a" -url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.23.0/lychee-x86_64-unknown-linux-musl.tar.gz" +checksum = "sha256:73657a111819a30c47c08352896796f23d64e4eb2b3ed39b6d32149241566fc5" +url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.24.2/lychee-x86_64-unknown-linux-musl.tar.gz" [tools.lychee."platforms.macos-arm64"] -checksum = "sha256:4c8034900e11083b68ac6f6582c377ff1f704e268991999e09d717973e493e7f" -url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.23.0/lychee-arm64-macos.dmg" +checksum = "sha256:c9d3740ea2d891854d37116c9fba840f37b6e7c89d330e7db84ac333631c4977" +url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.24.2/lychee-aarch64-apple-darwin.tar.gz" + +[tools.lychee."platforms.macos-x64"] +checksum = "sha256:887503a9cff667d322b8d0892b40bf49976eb9507af8483220a3706cdad55978" +url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.24.2/lychee-x86_64-apple-darwin.tar.gz" [tools.lychee."platforms.windows-x64"] -checksum = "sha256:0fda7ff0a60c0250939fc25361c2d4e6e7853c31c996733fdd5a1dd760bcb824" -url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.23.0/lychee-x86_64-windows.exe" +checksum = "sha256:32975d1493ee1a975d6bb41e4fb56fe419cb442ded628bb772ba2e614acfacad" +url = "https://github.com/lycheeverse/lychee/releases/download/lychee-v0.24.2/lychee-x86_64-pc-windows-msvc.zip" [[tools.maven]] -version = "3.9.15" +version = "3.9.16" backend = "aqua:apache/maven" [tools.maven."platforms.linux-arm64"] -url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" +checksum = "sha512:831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6" +url = "https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz" [tools.maven."platforms.linux-arm64-musl"] -url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" +checksum = "sha512:831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6" +url = "https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz" [tools.maven."platforms.linux-x64"] -url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" +checksum = "sha512:831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6" +url = "https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz" [tools.maven."platforms.linux-x64-musl"] -url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" +checksum = "sha512:831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6" +url = "https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz" [tools.maven."platforms.macos-arm64"] -url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" +checksum = "sha512:831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6" +url = "https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz" [tools.maven."platforms.macos-x64"] -url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" +checksum = "sha512:831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6" +url = "https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz" [tools.maven."platforms.windows-x64"] -url = "https://archive.apache.org/dist/maven/maven-3/3.9.15/binaries/apache-maven-3.9.15-bin.tar.gz" +checksum = "sha512:831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6" +url = "https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz" diff --git a/src/main/java/com/maxmind/geoip2/DatabaseProvider.java b/src/main/java/com/maxmind/geoip2/DatabaseProvider.java index 45f11180..5d709b15 100644 --- a/src/main/java/com/maxmind/geoip2/DatabaseProvider.java +++ b/src/main/java/com/maxmind/geoip2/DatabaseProvider.java @@ -42,7 +42,7 @@ Optional tryCity(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoIP Anonymous IP. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a AnonymousIpResponse for the requested IP address. + * @return an AnonymousIpResponse for the requested IP address. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -53,7 +53,7 @@ AnonymousIpResponse anonymousIp(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoIP Anonymous IP. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a AnonymousIpResponse for the requested IP address or empty if it is not in the DB. + * @return an AnonymousIpResponse for the requested IP address or empty if it is not in the DB. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -64,7 +64,7 @@ Optional tryAnonymousIp(InetAddress ipAddress) throws IOExc * Look up an IP address in a GeoIP Anonymous Plus. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a AnonymousPlusResponse for the requested IP address. + * @return an AnonymousPlusResponse for the requested IP address. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -75,7 +75,8 @@ AnonymousPlusResponse anonymousPlus(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoIP Anonymous Plus. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a AnonymousPlusResponse for the requested IP address or empty if it is not in the DB. + * @return an AnonymousPlusResponse for the requested IP address or empty if it + * is not in the DB. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -97,7 +98,7 @@ IpRiskResponse ipRisk(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoIP IP Risk database. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return an IPRiskResponse for the requested IP address or empty if it is not in the DB. + * @return an IpRiskResponse for the requested IP address or empty if it is not in the DB. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -108,7 +109,7 @@ Optional tryIpRisk(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoLite ASN database. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return an IspResponse for the requested IP address. + * @return an AsnResponse for the requested IP address. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -119,7 +120,7 @@ AsnResponse asn(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoLite ASN database. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return an IspResponse for the requested IP address or empty if it is not in the DB. + * @return an AsnResponse for the requested IP address or empty if it is not in the DB. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -130,7 +131,7 @@ Optional tryAsn(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoIP Connection Type database. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a ConnectTypeResponse for the requested IP address. + * @return a ConnectionTypeResponse for the requested IP address. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -141,7 +142,8 @@ ConnectionTypeResponse connectionType(InetAddress ipAddress) * Look up an IP address in a GeoIP Connection Type database. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a ConnectTypeResponse for the requested IP address or empty if it is not in the DB. + * @return a ConnectionTypeResponse for the requested IP address or empty if it + * is not in the DB. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ @@ -206,8 +208,8 @@ IspResponse isp(InetAddress ipAddress) throws IOException, /** * Look up an IP address in a GeoIP ISP database. * - * @param ipAddress IPv4 or IPv6 address to look up or empty if it is not in the DB. - * @return an IspResponse for the requested IP address. + * @param ipAddress IPv4 or IPv6 address to look up. + * @return an IspResponse for the requested IP address or empty if it is not in the DB. * @throws com.maxmind.geoip2.exception.GeoIp2Exception if there is an error looking up the IP * @throws java.io.IOException if there is an IO error */ diff --git a/src/main/java/com/maxmind/geoip2/DatabaseReader.java b/src/main/java/com/maxmind/geoip2/DatabaseReader.java index 500da8ad..57c959a8 100644 --- a/src/main/java/com/maxmind/geoip2/DatabaseReader.java +++ b/src/main/java/com/maxmind/geoip2/DatabaseReader.java @@ -214,9 +214,9 @@ public Builder withCache(NodeCache cache) { /** * @param val The file mode used to open the GeoIP database * @return Builder object - * @throws java.lang.IllegalArgumentException if you initialized the Builder with a URL, - * which uses {@link FileMode#MEMORY}, but you - * provided a different FileMode to this method. + * @throws java.lang.IllegalArgumentException if you initialized the Builder + * with an InputStream, which uses {@link FileMode#MEMORY}, but you + * provided a different FileMode to this method. */ public Builder fileMode(FileMode val) { if (this.stream != null && FileMode.MEMORY != val) { @@ -295,10 +295,12 @@ private Optional getResponse( *

*

* If you are using {@code FileMode.MEMORY_MAPPED}, this will - * not unmap the underlying file due to a limitation in Java's - * {@code MappedByteBuffer}. It will however set the reference to - * the buffer to {@code null}, allowing the garbage collector to - * collect it. + * release this reader's reference to the mapped buffer, allowing the + * garbage collector to collect it when no other references remain. Java + * does not provide a supported way to unmap a + * {@code MappedByteBuffer} immediately. On Windows, this means the + * database file may remain unavailable for rename, replacement, or + * deletion until the mapped buffer is garbage collected. *

* * @throws IOException if an I/O error occurs. @@ -352,7 +354,7 @@ public Optional tryCity(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoIP Anonymous IP. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a AnonymousIpResponse for the requested IP address. + * @return an AnonymousIpResponse for the requested IP address. * @throws GeoIp2Exception if there is an error looking up the IP * @throws IOException if there is an IO error */ @@ -379,7 +381,7 @@ public Optional tryAnonymousIp(InetAddress ipAddress) throw * Look up an IP address in a GeoIP Anonymous Plus. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a AnonymousPlusResponse for the requested IP address. + * @return an AnonymousPlusResponse for the requested IP address. * @throws GeoIp2Exception if there is an error looking up the IP * @throws IOException if there is an IO error */ @@ -408,7 +410,7 @@ public Optional tryAnonymousPlus(InetAddress ipAddress) * Look up an IP address in a GeoIP IP Risk database. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a IPRiskResponse for the requested IP address. + * @return an IpRiskResponse for the requested IP address. * @throws GeoIp2Exception if there is an error looking up the IP * @throws IOException if there is an IO error */ @@ -452,7 +454,7 @@ public Optional tryAsn(InetAddress ipAddress) throws IOException, * Look up an IP address in a GeoIP Connection Type database. * * @param ipAddress IPv4 or IPv6 address to lookup. - * @return a ConnectTypeResponse for the requested IP address. + * @return a ConnectionTypeResponse for the requested IP address. * @throws GeoIp2Exception if there is an error looking up the IP * @throws IOException if there is an IO error */ diff --git a/src/main/java/com/maxmind/geoip2/NetworkDeserializer.java b/src/main/java/com/maxmind/geoip2/NetworkDeserializer.java index 670ddc52..318ed4d8 100644 --- a/src/main/java/com/maxmind/geoip2/NetworkDeserializer.java +++ b/src/main/java/com/maxmind/geoip2/NetworkDeserializer.java @@ -21,7 +21,7 @@ public NetworkDeserializer() { } /** - * Constructs a @{code NetworkDeserializer} object. + * Constructs a {@code NetworkDeserializer} object. * * @param vc a class */ diff --git a/src/main/java/com/maxmind/geoip2/WebServiceClient.java b/src/main/java/com/maxmind/geoip2/WebServiceClient.java index 1178dae9..e44f9370 100644 --- a/src/main/java/com/maxmind/geoip2/WebServiceClient.java +++ b/src/main/java/com/maxmind/geoip2/WebServiceClient.java @@ -385,7 +385,7 @@ public InsightsResponse insights() throws IOException, GeoIp2Exception { /** * @param ipAddress IPv4 or IPv6 address to lookup. - * @return An Insight model for the requested IP address. + * @return An Insights model for the requested IP address. * @throws GeoIp2Exception if there is an error looking up the IP * @throws IOException if there is an IO error */ diff --git a/src/main/java/com/maxmind/geoip2/WebServiceProvider.java b/src/main/java/com/maxmind/geoip2/WebServiceProvider.java index 63140512..9d8f8f1f 100644 --- a/src/main/java/com/maxmind/geoip2/WebServiceProvider.java +++ b/src/main/java/com/maxmind/geoip2/WebServiceProvider.java @@ -34,7 +34,7 @@ public interface WebServiceProvider extends GeoIp2Provider { /** * @param ipAddress IPv4 or IPv6 address to lookup. - * @return An Insight model for the requested IP address. + * @return An Insights model for the requested IP address. * @throws GeoIp2Exception if there is an error looking up the IP * @throws IOException if there is an IO error */ diff --git a/src/main/java/com/maxmind/geoip2/model/ConnectionTypeResponse.java b/src/main/java/com/maxmind/geoip2/model/ConnectionTypeResponse.java index 0fa09310..83683c59 100644 --- a/src/main/java/com/maxmind/geoip2/model/ConnectionTypeResponse.java +++ b/src/main/java/com/maxmind/geoip2/model/ConnectionTypeResponse.java @@ -66,7 +66,7 @@ public String toString() { } /** - * Creates an instance of {@code ConnectionTypeResponse} from a string. + * Creates an instance of {@code ConnectionType} from a string. * * @param s The string to create the instance from. */