diff options
16 files changed, 66 insertions, 31 deletions
diff --git a/container-dependency-versions/pom.xml b/container-dependency-versions/pom.xml index e0f2c1f0a0c..c743c6c2b2e 100644 --- a/container-dependency-versions/pom.xml +++ b/container-dependency-versions/pom.xml @@ -313,7 +313,7 @@ <artifactId>javassist</artifactId> <version>${javassist.version}</version> </dependency> - <dependency> <!-- TODO Vespa 8: upgrade to newest version. Consider removing as provided dependency --> + <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>${org.json.version}</version> diff --git a/container-dev/pom.xml b/container-dev/pom.xml index a7217d05315..7297b21f68d 100644 --- a/container-dev/pom.xml +++ b/container-dev/pom.xml @@ -153,6 +153,10 @@ <artifactId>icu4j</artifactId> </exclusion> <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + <exclusion> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> </exclusion> @@ -189,6 +193,10 @@ <version>${project.version}</version> <exclusions> <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + <exclusion> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> </exclusion> diff --git a/container-test/pom.xml b/container-test/pom.xml index 4b5008c8a6f..d1021202a24 100644 --- a/container-test/pom.xml +++ b/container-test/pom.xml @@ -35,6 +35,10 @@ <artifactId>jackson-dataformat-xml</artifactId> </dependency> <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + </dependency> + <dependency> <groupId>io.airlift</groupId> <artifactId>airline</artifactId> <exclusions> @@ -85,6 +89,10 @@ <version>1.8.0</version> </dependency> <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + </dependency> + <dependency> <groupId>commons-digester</groupId> <artifactId>commons-digester</artifactId> <version>1.8</version> diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java index 95867b3786c..dd43195f67d 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/proxy/ConfigServerRestExecutorImpl.java @@ -213,7 +213,7 @@ public class ConfigServerRestExecutorImpl extends AbstractComponent implements C HostnameVerifier hostnameVerifier) { return HttpClientBuilder.create() .setUserAgent("config-server-proxy-client") - .setSSLContext(sslContextProvider.getIdentitySslContext()) + .setSslcontext(sslContextProvider.getIdentitySslContext()) .setSSLHostnameVerifier(hostnameVerifier) .setDefaultRequestConfig(config) .setMaxConnPerRoute(10) diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/FlagsClient.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/FlagsClient.java index 5cd6b32d572..b22c9e44a2b 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/FlagsClient.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/FlagsClient.java @@ -87,7 +87,7 @@ class FlagsClient { return HttpClientBuilder.create() .setUserAgent("controller-flags-v1-client") .setRetryHandler(new DefaultHttpRequestRetryHandler(5, /*retry on non-idempotent requests*/true)) - .setSSLContext(identityProvider.getIdentitySslContext()) + .setSslcontext(identityProvider.getIdentitySslContext()) .setSSLHostnameVerifier(new FlagTargetsHostnameVerifier(targets)) .setDefaultRequestConfig(RequestConfig.custom() .setConnectTimeout((int) Duration.ofSeconds(10).toMillis()) diff --git a/docker-api/pom.xml b/docker-api/pom.xml index 2257437adfa..1cb03f1819d 100644 --- a/docker-api/pom.xml +++ b/docker-api/pom.xml @@ -94,6 +94,12 @@ </exclusions> </dependency> <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.10</version> + <scope>compile</scope> + </dependency> + <dependency> <groupId>net.jpountz.lz4</groupId> <artifactId>lz4</artifactId> <scope>compile</scope> diff --git a/docprocs/pom.xml b/docprocs/pom.xml index 2d222431d8f..b7272de2253 100644 --- a/docprocs/pom.xml +++ b/docprocs/pom.xml @@ -52,6 +52,10 @@ <artifactId>annotations</artifactId> </exclusion> <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + <exclusion> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> </exclusion> diff --git a/document/pom.xml b/document/pom.xml index f5c5dec5b7c..1696d525f6f 100644 --- a/document/pom.xml +++ b/document/pom.xml @@ -27,6 +27,10 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> diff --git a/document/src/main/java/com/yahoo/document/annotation/AnnotationType2AnnotationContainer.java b/document/src/main/java/com/yahoo/document/annotation/AnnotationType2AnnotationContainer.java index b0079759b21..121ccfb2cda 100644 --- a/document/src/main/java/com/yahoo/document/annotation/AnnotationType2AnnotationContainer.java +++ b/document/src/main/java/com/yahoo/document/annotation/AnnotationType2AnnotationContainer.java @@ -1,10 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; -import com.google.common.collect.Multimap; -import com.google.common.collect.Multimaps; +import org.apache.commons.collections.map.MultiValueMap; -import java.util.ArrayList; import java.util.Collection; import java.util.IdentityHashMap; import java.util.Iterator; @@ -12,11 +10,11 @@ import java.util.NoSuchElementException; /** * - * @author Einar M R Rosenvinge + * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> */ // TODO: Should this be removed? public class AnnotationType2AnnotationContainer extends IteratingAnnotationContainer { - private final Multimap<AnnotationType, Annotation> annotationType2Annotation = Multimaps.newMultimap(new IdentityHashMap<>(), ArrayList::new); + private final MultiValueMap annotationType2Annotation = MultiValueMap.decorate(new IdentityHashMap()); @Override void annotateAll(Collection<Annotation> annotations) { diff --git a/document/src/main/java/com/yahoo/document/annotation/SpanNode2AnnotationContainer.java b/document/src/main/java/com/yahoo/document/annotation/SpanNode2AnnotationContainer.java index c19f02f5c0b..b65b6b7b4d6 100644 --- a/document/src/main/java/com/yahoo/document/annotation/SpanNode2AnnotationContainer.java +++ b/document/src/main/java/com/yahoo/document/annotation/SpanNode2AnnotationContainer.java @@ -1,9 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.document.annotation; - -import com.google.common.collect.Multimap; -import com.google.common.collect.Multimaps; +import org.apache.commons.collections.map.MultiValueMap; import java.util.ArrayList; import java.util.Collection; @@ -15,10 +13,10 @@ import java.util.List; /** * TODO: Should this be removed? * - * @author Einar M R Rosenvinge + * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> */ class SpanNode2AnnotationContainer extends AnnotationContainer { - private final Multimap<SpanNode, Annotation> spanNode2Annotation = Multimaps.newMultimap(new IdentityHashMap<>(), ArrayList::new); + private final MultiValueMap spanNode2Annotation = MultiValueMap.decorate(new IdentityHashMap()); @Override void annotateAll(Collection<Annotation> annotations) { @@ -45,7 +43,7 @@ class SpanNode2AnnotationContainer extends AnnotationContainer { @Override @SuppressWarnings("unchecked") Iterator<Annotation> iterator(SpanNode node) { - Collection<Annotation> annotationsForNode = spanNode2Annotation.get(node); + Collection<Annotation> annotationsForNode = spanNode2Annotation.getCollection(node); if (annotationsForNode == null) { return Collections.<Annotation>emptyList().iterator(); } @@ -65,7 +63,7 @@ class SpanNode2AnnotationContainer extends AnnotationContainer { } List<Collection<Annotation>> annotationLists = new ArrayList<Collection<Annotation>>(nodes.size()); for (SpanNode includedNode : nodes.keySet()) { - Collection<Annotation> includedAnnotations = spanNode2Annotation.get(includedNode); + Collection<Annotation> includedAnnotations = spanNode2Annotation.getCollection(includedNode); if (includedAnnotations != null) { annotationLists.add(includedAnnotations); } diff --git a/document/src/main/java/com/yahoo/document/annotation/SpanTree.java b/document/src/main/java/com/yahoo/document/annotation/SpanTree.java index 05e5ff41cf1..2206d95aa38 100644 --- a/document/src/main/java/com/yahoo/document/annotation/SpanTree.java +++ b/document/src/main/java/com/yahoo/document/annotation/SpanTree.java @@ -2,7 +2,6 @@ package com.yahoo.document.annotation; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMultiset; import com.yahoo.document.CollectionDataType; import com.yahoo.document.Field; import com.yahoo.document.MapDataType; @@ -12,14 +11,9 @@ import com.yahoo.document.datatypes.FieldValue; import com.yahoo.document.datatypes.MapFieldValue; import com.yahoo.document.datatypes.StringFieldValue; import com.yahoo.document.datatypes.StructuredFieldValue; +import org.apache.commons.collections.CollectionUtils; -import java.util.ArrayList; -import java.util.Collection; -import java.util.IdentityHashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.util.*; /** * A SpanTree holds a root node of a tree of SpanNodes, and a List of Annotations pointing to these nodes @@ -678,8 +672,7 @@ public class SpanTree implements Iterable<Annotation>, SpanNodeParent, Comparabl List<Annotation> annotationCollection = new LinkedList<Annotation>(getAnnotations()); List<Annotation> otherAnnotations = new LinkedList<Annotation>(tree.getAnnotations()); - return annotationCollection.size() == otherAnnotations.size() && - ImmutableMultiset.copyOf(annotationCollection).equals(ImmutableMultiset.copyOf(otherAnnotations)); + return annotationCollection.size() == otherAnnotations.size() && CollectionUtils.isEqualCollection(annotationCollection, otherAnnotations); } @Override diff --git a/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/server/jetty/HealthCheckProxyHandler.java b/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/server/jetty/HealthCheckProxyHandler.java index ffff63a424e..e206cb3215d 100644 --- a/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/server/jetty/HealthCheckProxyHandler.java +++ b/jdisc_http_service/src/main/java/com/yahoo/jdisc/http/server/jetty/HealthCheckProxyHandler.java @@ -133,7 +133,7 @@ class HealthCheckProxyHandler extends HandlerWrapper { client = HttpClientBuilder.create() .disableAutomaticRetries() .setConnectionReuseStrategy(NoConnectionReuseStrategy.INSTANCE) - .setSSLContext(sslContextFactory.getSslContext()) + .setSslcontext(sslContextFactory.getSslContext()) .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE) .setUserTokenHandler(context -> null) // https://stackoverflow.com/a/42112034/1615280 .setUserAgent("health-check-proxy-client") diff --git a/parent/pom.xml b/parent/pom.xml index ca6e361899c..52b8737f422 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -475,9 +475,24 @@ <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> + <version>1.3.1</version> + </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> <version>1.4</version> </dependency> <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.2.1</version> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.6</version> + </dependency> + <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>2.0</version> @@ -735,8 +750,8 @@ <properties> <antlr.version>3.5.2</antlr.version> <antlr4.version>4.5</antlr4.version> - <apache.httpclient.version>4.5.10</apache.httpclient.version> - <apache.httpcore.version>4.4.12</apache.httpcore.version> + <apache.httpclient.version>4.4.1</apache.httpclient.version> + <apache.httpcore.version>4.4.1</apache.httpcore.version> <asm.version>7.0</asm.version> <!-- Athenz dependencies. Make sure these dependencies match those in Vespa's internal repositories --> <athenz.version>1.8.29</athenz.version> diff --git a/security-tools/pom.xml b/security-tools/pom.xml index 38b14ce957f..76882927059 100644 --- a/security-tools/pom.xml +++ b/security-tools/pom.xml @@ -22,6 +22,7 @@ <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> + <version>1.4</version> <scope>compile</scope> </dependency> diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/DefaultIdentityDocumentClient.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/DefaultIdentityDocumentClient.java index c99e40732bb..dba29841952 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/DefaultIdentityDocumentClient.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/DefaultIdentityDocumentClient.java @@ -101,7 +101,7 @@ public class DefaultIdentityDocumentClient implements IdentityDocumentClient { HostnameVerifier hostnameVerifier) { return HttpClientBuilder.create() .setRetryHandler(new DefaultHttpRequestRetryHandler(3, /*requestSentRetryEnabled*/true)) - .setSSLContext(sslContext) + .setSslcontext(sslContext) .setSSLHostnameVerifier(hostnameVerifier) .setUserAgent("default-identity-document-client") .setDefaultRequestConfig(RequestConfig.custom() 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 ac6a1d7cd22..0e7488c8927 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 @@ -413,7 +413,7 @@ class ApacheGatewayConnection implements GatewayConnection { } else { clientBuilder = HttpClientBuilder.create(); if (connectionParams.getSslContext() != null) { - clientBuilder.setSSLContext(connectionParams.getSslContext()); + clientBuilder.setSslcontext(connectionParams.getSslContext()); } else { SslContextBuilder builder = new SslContextBuilder(); if (connectionParams.getPrivateKey() != null && connectionParams.getCertificate() != null) { @@ -422,7 +422,7 @@ class ApacheGatewayConnection implements GatewayConnection { if (connectionParams.getCaCertificates() != null) { builder.withTrustStore(connectionParams.getCaCertificates()); } - clientBuilder.setSSLContext(builder.build()); + clientBuilder.setSslcontext(builder.build()); } if (connectionParams.getHostnameVerifier() != null) { clientBuilder.setSSLHostnameVerifier(connectionParams.getHostnameVerifier()); |