From b2eb211c65ef3d6b059b752a3a034027ee9e81b6 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Fri, 26 Jul 2019 12:53:20 +0200 Subject: Duration.toSeconds() is only available on Java 9+ --- .../vespa/http/client/core/communication/ApacheGatewayConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vespa-http-client') diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java index 77a18b631ee..00f52d6337f 100644 --- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java +++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java @@ -406,7 +406,7 @@ class ApacheGatewayConnection implements GatewayConnection { } clientBuilder.setMaxConnPerRoute(1); clientBuilder.setMaxConnTotal(1); - clientBuilder.setConnectionTimeToLive(connectionParams.getConnectionTimeToLive().toSeconds(), TimeUnit.SECONDS); + clientBuilder.setConnectionTimeToLive(connectionParams.getConnectionTimeToLive().getSeconds(), TimeUnit.SECONDS); clientBuilder.setUserAgent(String.format("vespa-http-client (%s)", Vtag.currentVersion)); clientBuilder.setDefaultHeaders(Collections.singletonList(new BasicHeader(Headers.CLIENT_VERSION, Vtag.currentVersion))); clientBuilder.disableContentCompression(); -- cgit v1.2.3