Skip to content

Commit 2bd05c7

Browse files
committed
Suppress IDE warnings on Java 8 MR3 methods
If IntelliJ is configured with a project SDK newer than JDK 8, it will emit build-breaking errors on uses of methods that were added in newer versions and later backported to Java 8, such as the ALPN support added in Maintenance Release 3 (`setApplicationProtocols()`), because they are documented as `@since 9` or `@since 11` in Javadoc. This change suppresses those warnings, since we know these methods are safe to use.
1 parent 1bfeaaf commit 2bd05c7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/DefaultHttpClientConnectionOperator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ private void connectToUnixDomainSocket(
299299
}
300300
}
301301

302+
@SuppressWarnings("Since15")
302303
private static void configureSocket(final Socket socket, final SocketConfig socketConfig,
303304
final Timeout soTimeout) throws IOException {
304305
if (soTimeout != null) {

httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultClientTlsStrategy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public DefaultClientTlsStrategy(final SSLContext sslContext) {
151151
}
152152

153153
@Override
154+
@SuppressWarnings("Since15")
154155
void applyParameters(final SSLEngine sslEngine, final SSLParameters sslParameters, final String[] appProtocols) {
155156
sslParameters.setApplicationProtocols(appProtocols);
156157
sslEngine.setSSLParameters(sslParameters);

0 commit comments

Comments
 (0)