From c12f4775a03f1d16420a689f0b9d50d35c32413b Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Fri, 25 Sep 2020 11:35:34 +0200 Subject: Copyright header, one more catch, unused parameter GC --- .../com/yahoo/document/restapi/DocumentOperationExecutor.java | 6 +++--- .../yahoo/document/restapi/resource/DocumentV1ApiHandler.java | 11 +++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'vespaclient-container-plugin') diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java index 05edfb6e95f..4700272de3c 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java @@ -1,3 +1,4 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.restapi; import com.yahoo.cloud.config.ClusterListConfig; @@ -83,9 +84,8 @@ public class DocumentOperationExecutor { private final Thread retryWorker; private final Thread timeoutWorker; - public DocumentOperationExecutor(DocumentmanagerConfig documentmanagerConfig, ClusterListConfig clustersConfig, - AllClustersBucketSpacesConfig bucketsConfig, DocumentOperationExecutorConfig executorConfig, - DocumentAccess access, Clock clock) { + public DocumentOperationExecutor(ClusterListConfig clustersConfig, AllClustersBucketSpacesConfig bucketsConfig, + DocumentOperationExecutorConfig executorConfig, DocumentAccess access, Clock clock) { this(Duration.ofMillis(executorConfig.resendDelayMillis()), Duration.ofSeconds(executorConfig.defaultTimeoutSeconds()), Duration.ofSeconds(executorConfig.visitTimeoutSeconds()), diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java index 64bc4913de0..3f2ac74c5ca 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java @@ -1,4 +1,4 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.restapi.resource; import com.fasterxml.jackson.core.JsonFactory; @@ -127,8 +127,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler { AllClustersBucketSpacesConfig bucketSpacesConfig, DocumentOperationExecutorConfig executorConfig) { this(clock, - new DocumentOperationExecutor(documentManagerConfig, clusterListConfig, bucketSpacesConfig, executorConfig, - documentAccess, clock), + new DocumentOperationExecutor(clusterListConfig, bucketSpacesConfig, executorConfig, documentAccess, clock), new DocumentOperationParser(documentManagerConfig), metric, metricReceiver); @@ -446,8 +445,12 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler { log.log(FINE, () -> "Problems writing data to jDisc content channel: " + Exceptions.toMessageString(e)); } finally { - if (out != null) + if (out != null) try { out.close(logException); + } + catch (Exception e) { + log.log(FINE, () -> "Problems closing jDisc content channel: " + Exceptions.toMessageString(e)); + } } return ignoredContent; } -- cgit v1.2.3