Skip to content

Commit 9cf35b5

Browse files
oschwaldclaude
andcommitted
Remove deprecated exception getUrl() methods
* Remove deprecated getUrl() methods from HttpException and InvalidRequestException * Use getUri() method instead which returns URI objects 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 0b6d69c commit 9cf35b5

File tree

3 files changed

+2
-28
lines changed

3 files changed

+2
-28
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ CHANGELOG
1212
`proxy(ProxySelector)` respectively.
1313
* **BREAKING:** The deprecated `WebServiceClient.close()` method has been
1414
removed along with the `Closeable` interface implementation.
15+
* **BREAKING:** The deprecated `getUrl()` methods in `HttpException` and
16+
`InvalidRequestException` have been removed. Use `getUri()` instead.
1517

1618
4.4.0
1719
------------------

src/main/java/com/maxmind/geoip2/exception/HttpException.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package com.maxmind.geoip2.exception;
22

33
import java.io.IOException;
4-
import java.net.MalformedURLException;
54
import java.net.URI;
6-
import java.net.URL;
75

86
/**
97
* This class represents an HTTP transport error. This is not an error returned
@@ -53,17 +51,5 @@ public URI getUri() {
5351
return this.uri;
5452
}
5553

56-
/**
57-
* @return the URL queried.
58-
* @deprecated Use getUri() instead
59-
*/
60-
@Deprecated
61-
public URL getUrl() {
62-
try {
63-
return this.uri.toURL();
64-
} catch (MalformedURLException e) {
65-
return null;
66-
}
67-
}
6854

6955
}

src/main/java/com/maxmind/geoip2/exception/InvalidRequestException.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.maxmind.geoip2.exception;
22

3-
import java.net.MalformedURLException;
43
import java.net.URI;
5-
import java.net.URL;
64

75
/**
86
* This class represents a non-specific error returned by MaxMind's GeoIP2 web
@@ -53,16 +51,4 @@ public URI getUri() {
5351
return this.uri;
5452
}
5553

56-
/**
57-
* @return the URL queried.
58-
* @deprecated Use getUri() instead
59-
*/
60-
@Deprecated
61-
public URL getUrl() {
62-
try {
63-
return this.uri.toURL();
64-
} catch (MalformedURLException e) {
65-
return null;
66-
}
67-
}
6854
}

0 commit comments

Comments
 (0)