Skip to content

Commit 6cc1a6d

Browse files
committed
Switch to Java 11's HttpClient
1 parent e35bfcf commit 6cc1a6d

9 files changed

Lines changed: 228 additions & 164 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
fail-fast: false
88
matrix:
99
os: [ubuntu-latest, windows-latest, macos-latest]
10-
version: [ 8, 9, 10, 11, 12, 13, 14, 15 ]
10+
version: [ 11, 12, 13, 14, 15 ]
1111
steps:
1212
- uses: actions/checkout@v2
1313
with:

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
CHANGELOG
22
=========
33

4-
1.19.0
4+
2.0.0
55
-------------------
66

7+
* Java 11 or greater is now required.
8+
* Apache HttpClient has been replaced with `java.net.http.HttpClient`.
9+
* The `close()` method on `WebServiceClient` is now deprecated. It
10+
no longer does anything.
11+
* On `WebServiceClient.Builder`:
12+
* `connectTimeout(int)` has been deprecated in favor of
13+
`connectTimeout(Duration)`.
14+
* `readTimeout(int)` has been deprecated in favor of
15+
`requestTimeout(Duration)`.
16+
* `proxy(Proxy)` has been deprecated in favor of `proxy(ProxySelector)`.
17+
* On `HttpException` and `InvalidRequestException`, `getUrl()` has been
18+
deprecated in favor of `getUri()`. Constructors that took a `URL` have
19+
been replaced with the equivalent taking a `URI`.
20+
* Deprecated constructors on model classes were removed.
721
* Upgraded the `geoip2` dependency to 2.16.1. This adds mobile country code
822
(MCC) and mobile network code (MNC) to minFraud Insights and Factors
923
responses. These are available at

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ If you are having an issue with the minFraud service that is not specific
271271
to the client API, please see
272272
[our support page](https://www.maxmind.com/en/support).
273273

274-
## Requirements ##
274+
## Requirements ##
275275

276-
This code requires Java 8+.
276+
This code requires Java 11+.
277277

278278
## Contributing ##
279279

pom.xml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,29 +64,6 @@
6464
<artifactId>geoip2</artifactId>
6565
<version>2.16.1</version>
6666
</dependency>
67-
<dependency>
68-
<groupId>org.apache.httpcomponents</groupId>
69-
<artifactId>httpclient</artifactId>
70-
<version>4.5.13</version>
71-
</dependency>
72-
<dependency>
73-
<!-- httpclient pulls this in. We pull in a newer version
74-
because of a security issue in 1.11 -->
75-
<groupId>commons-codec</groupId>
76-
<artifactId>commons-codec</artifactId>
77-
<version>1.15</version>
78-
</dependency>
79-
<!--
80-
commons-validator 1.6 depends on an older version of
81-
commons-beanutils with a CVE. So add a direct dependency on the
82-
commons-beanutils version that is fixed, while we wait for
83-
commons-validator to be updated.
84-
-->
85-
<dependency>
86-
<groupId>commons-beanutils</groupId>
87-
<artifactId>commons-beanutils</artifactId>
88-
<version>1.9.4</version>
89-
</dependency>
9067
<dependency>
9168
<groupId>commons-validator</groupId>
9269
<artifactId>commons-validator</artifactId>
@@ -160,7 +137,7 @@
160137
<version>3.3.1</version>
161138
<configuration>
162139
<show>public</show>
163-
<source>8</source>
140+
<source>11</source>
164141
</configuration>
165142
</plugin>
166143
<plugin>
@@ -186,8 +163,9 @@
186163
<artifactId>maven-compiler-plugin</artifactId>
187164
<version>3.8.1</version>
188165
<configuration>
189-
<source>1.8</source>
190-
<target>1.8</target>
166+
<release>11</release>
167+
<source>1.11</source>
168+
<target>1.11</target>
191169
</configuration>
192170
</plugin>
193171
<plugin>

0 commit comments

Comments
 (0)