Skip to content

Commit a4911ed

Browse files
Fixed null IP issue
1 parent 14a9156 commit a4911ed

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

com/ip2location/Country.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
/**
1414
* This class parses country information CSV and returns the country information.
1515
* <p>
16-
* Copyright (c) 2002-2024 IP2Location.com
16+
* Copyright (c) 2002-2025 IP2Location.com
1717
* <p>
1818
*
1919
* @author IP2Location.com
20-
* @version 8.12.0
20+
* @version 8.12.1
2121
*/
2222
public class Country {
2323
private final Map<String, Map<String, String>> records = new HashMap<>();

com/ip2location/IP2Location.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
* <li>And much, much more!</li>
3131
* </ul>
3232
* <p>
33-
* Copyright (c) 2002-2024 IP2Location.com
33+
* Copyright (c) 2002-2025 IP2Location.com
3434
* <p>
3535
*
3636
* @author IP2Location.com
37-
* @version 8.12.0
37+
* @version 8.12.1
3838
*/
3939
public class IP2Location {
4040
private static final Pattern pattern = Pattern.compile("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"); // IPv4
@@ -501,7 +501,7 @@ protected void finalize() throws Throwable {
501501
*/
502502
public IPResult IPQuery(String IPAddress) throws IOException {
503503
if (IPAddress != null) {
504-
IPAddress = IPAddress.trim();
504+
IPAddress = IPAddress.trim();
505505
}
506506
IPResult record = new IPResult(IPAddress);
507507
FileLike filehandle = null;

com/ip2location/IP2LocationWebService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
* <li>And much, much more!</li>
2323
* </ul>
2424
* <p>
25-
* Copyright (c) 2002-2024 IP2Location.com
25+
* Copyright (c) 2002-2025 IP2Location.com
2626
* <p>
2727
*
2828
* @author IP2Location.com
29-
* @version 8.12.0
29+
* @version 8.12.1
3030
*/
3131
public class IP2LocationWebService {
3232
private static final Pattern pattern = Pattern.compile("^[\\dA-Z]{10}$");

com/ip2location/IPResult.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
/**
44
* This class is used to store the geolocation data that is returned by the IP2Location class.
55
* <p>
6-
* Copyright (c) 2002-2024 IP2Location.com
6+
* Copyright (c) 2002-2025 IP2Location.com
77
* <p>
88
*
99
* @author IP2Location.com
10-
* @version 8.12.0
10+
* @version 8.12.1
1111
*/
1212
public class IPResult {
1313
static final String NOT_SUPPORTED = "Not_Supported";
@@ -39,7 +39,7 @@ public class IPResult {
3939
String as;
4040
String status;
4141
boolean delay = false;
42-
String version = "Version 8.11.2";
42+
String version = "Version 8.12.1";
4343

4444
IPResult(String ipstring) {
4545
ip_address = ipstring;

com/ip2location/IPTools.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
* <li>Converts CIDR to IPv6 range</li>
3131
* </ul>
3232
* <p>
33-
* Copyright (c) 2002-2024 IP2Location.com
33+
* Copyright (c) 2002-2025 IP2Location.com
3434
* <p>
3535
*
3636
* @author IP2Location.com
37-
* @version 8.12.0
37+
* @version 8.12.1
3838
*/
3939
public class IPTools {
4040
private static final BigInteger MAX_IPV4_RANGE = new BigInteger("4294967295");

com/ip2location/Region.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
/**
1515
* This class parses region information CSV and returns the region code.
1616
* <p>
17-
* Copyright (c) 2002-2024 IP2Location.com
17+
* Copyright (c) 2002-2025 IP2Location.com
1818
* <p>
1919
*
2020
* @author IP2Location.com
21-
* @version 8.12.0
21+
* @version 8.12.1
2222
*/
2323
public class Region {
2424
private final Map<String, List<Map<String, String>>> records = new HashMap<>();

0 commit comments

Comments
 (0)