diff --git a/.excavator.yml b/.excavator.yml index a947e38d5d..c1d8bf1af4 100644 --- a/.excavator.yml +++ b/.excavator.yml @@ -5,6 +5,7 @@ auto-label: versions-props/upgrade-all: [ "merge when ready" ] circleci/manage-circleci: [ "merge when ready" ] tags: + donotmerge: [ "do not merge" ] roomba: [ "merge when ready" ] automerge: [ "merge when ready" ] autorelease: [ "autorelease" ] diff --git a/build.gradle b/build.gradle index 4dfd1697a1..a83385b87d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,18 +5,18 @@ buildscript { } dependencies { - classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.5.0' - classpath 'com.palantir.gradle.jdks:gradle-jdks:0.33.0' - classpath 'com.palantir.gradle.jdkslatest:gradle-jdks-latest:0.10.0' + classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.6.0' + classpath 'com.palantir.gradle.jdks:gradle-jdks:0.34.0' + classpath 'com.palantir.gradle.jdkslatest:gradle-jdks-latest:0.12.0' classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.12.0' - classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.35.0' + classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.38.0' classpath 'com.palantir.gradle.revapi:gradle-revapi:1.7.0' classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:7.0.1' - classpath 'com.palantir.baseline:gradle-baseline-java:5.13.0' + classpath 'com.palantir.baseline:gradle-baseline-java:5.25.0' classpath 'com.palantir.gradle.gitversion:gradle-git-version:3.0.0' - classpath 'com.palantir.metricschema:gradle-metric-schema:0.22.0' + classpath 'com.palantir.metricschema:gradle-metric-schema:0.25.0' classpath 'gradle.plugin.org.inferred:gradle-processors:3.7.0' - classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.13.0' + classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.16.0' } } @@ -29,7 +29,7 @@ apply plugin: 'com.palantir.jdks.latest' javaVersions { libraryTarget = 11 - runtime = 17 + runtime = 21 } version gitVersion() @@ -67,12 +67,6 @@ allprojects { version { strictly '2.4.0' } because 'Retrofit 2.5.0 breaks with our path parameter routing logic' } - - rootConfiguration 'com.squareup.okhttp3:okhttp', { - version { strictly '[3, 3.14.0[' } - because 'okhttp 3.14.0 removed UnrepeatableRequestBody which is relied on by an internal library' - } - } } } @@ -81,7 +75,7 @@ subprojects { apply plugin: 'java-library' apply plugin: 'com.palantir.baseline-class-uniqueness' - tasks.check.dependsOn javadoc, checkUnusedDependencies + tasks.check.dependsOn javadoc, checkImplicitDependenciesMain, checkUnusedDependencies test { minHeapSize = "512m" diff --git a/changelog/7.62.0/pr-2714.v2.yml b/changelog/7.62.0/pr-2714.v2.yml new file mode 100644 index 0000000000..7236abf1b3 --- /dev/null +++ b/changelog/7.62.0/pr-2714.v2.yml @@ -0,0 +1,5 @@ +type: fix +fix: + description: Replace deprecated mappingException + links: + - https://github.com/palantir/conjure-java-runtime/pull/2714 diff --git a/changelog/7.65.0/pr-2721.v2.yml b/changelog/7.65.0/pr-2721.v2.yml new file mode 100644 index 0000000000..f3bbb6221f --- /dev/null +++ b/changelog/7.65.0/pr-2721.v2.yml @@ -0,0 +1,5 @@ +type: fix +fix: + description: Always load certificates from the same jar as the code + links: + - https://github.com/palantir/conjure-java-runtime/pull/2721 diff --git a/changelog/7.67.0/pr-2709.v2.yml b/changelog/7.67.0/pr-2709.v2.yml new file mode 100644 index 0000000000..a92d54f40c --- /dev/null +++ b/changelog/7.67.0/pr-2709.v2.yml @@ -0,0 +1,5 @@ +type: improvement +improvement: + description: Bump to OkHttp 4.X + links: + - https://github.com/palantir/conjure-java-runtime/pull/2709 diff --git a/client-config/build.gradle b/client-config/build.gradle index a2ab8a6080..a3990b95ff 100644 --- a/client-config/build.gradle +++ b/client-config/build.gradle @@ -7,7 +7,10 @@ dependencies { api 'com.palantir.tritium:tritium-registry' api 'com.google.errorprone:error_prone_annotations' api 'com.palantir.refreshable:refreshable' + implementation 'com.palantir.conjure.java.api:ssl-config' + implementation 'com.palantir.safe-logging:preconditions' implementation 'com.palantir.safe-logging:safe-logging' + implementation 'com.google.code.findbugs:jsr305' implementation 'com.google.guava:guava' implementation project(":keystores") diff --git a/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfiguration.java b/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfiguration.java index b76487eca8..f5c97be3a3 100644 --- a/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfiguration.java +++ b/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfiguration.java @@ -23,6 +23,7 @@ import com.palantir.conjure.java.api.config.service.PartialServiceConfiguration; import com.palantir.conjure.java.api.config.service.ServiceConfiguration; import com.palantir.conjure.java.api.config.service.UserAgent; +import com.palantir.logsafe.DoNotLog; import com.palantir.logsafe.SafeArg; import com.palantir.logsafe.UnsafeArg; import com.palantir.tritium.metrics.registry.TaggedMetricRegistry; @@ -38,6 +39,7 @@ * A context-independent (i.e., does not depend on configuration files or on-disk entities like JKS keystores) * instantiation of a {@link ServiceConfiguration}. */ +@DoNotLog @Value.Immutable @ImmutablesStyle public interface ClientConfiguration { diff --git a/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfigurations.java b/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfigurations.java index 5fb492542a..27a216c87f 100644 --- a/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfigurations.java +++ b/client-config/src/main/java/com/palantir/conjure/java/client/config/ClientConfigurations.java @@ -25,8 +25,10 @@ import com.palantir.conjure.java.api.config.ssl.SslConfiguration; import com.palantir.conjure.java.config.ssl.SslSocketFactories; import com.palantir.conjure.java.config.ssl.TrustContext; +import com.palantir.logsafe.SafeArg; import com.palantir.logsafe.UnsafeArg; import com.palantir.logsafe.exceptions.SafeIllegalArgumentException; +import com.palantir.logsafe.exceptions.SafeIllegalStateException; import com.palantir.logsafe.logger.SafeLogger; import com.palantir.logsafe.logger.SafeLoggerFactory; import com.palantir.tritium.metrics.registry.SharedTaggedMetricRegistries; @@ -200,7 +202,10 @@ public static ProxySelector createProxySelector(ProxyConfiguration proxyConfig) // fall through } - throw new IllegalStateException("Failed to create ProxySelector for proxy configuration: " + proxyConfig); + throw new SafeIllegalStateException( + "Failed to create ProxySelector for proxy configuration", + SafeArg.of("type", proxyConfig.type()), + UnsafeArg.of("hostAndPort", proxyConfig.hostAndPort())); } @VisibleForTesting diff --git a/conjure-java-jackson-serialization/build.gradle b/conjure-java-jackson-serialization/build.gradle index 0360d8f9d8..c0915751e0 100644 --- a/conjure-java-jackson-serialization/build.gradle +++ b/conjure-java-jackson-serialization/build.gradle @@ -12,8 +12,13 @@ dependencies { api "com.fasterxml.jackson.datatype:jackson-datatype-joda" api "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" api "com.palantir.safe-logging:preconditions" + implementation 'com.fasterxml.jackson.core:jackson-core' + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.guava:guava' implementation "com.palantir.safe-logging:logger" + implementation 'com.palantir.safe-logging:safe-logging' implementation 'com.palantir.tritium:tritium-registry' + implementation 'io.dropwizard.metrics:metrics-core' testImplementation "org.assertj:assertj-core" testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/ObjectMappers.java b/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/ObjectMappers.java index 8916acefd2..7dd441e3ce 100644 --- a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/ObjectMappers.java +++ b/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/ObjectMappers.java @@ -17,6 +17,7 @@ package com.palantir.conjure.java.serialization; import com.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.StreamReadConstraints; import com.fasterxml.jackson.core.TSFBuilder; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; @@ -243,12 +244,18 @@ public static CBORFactory cborFactory() { /** Configures provided JsonFactory with Conjure default settings. */ private static > B withDefaults(B builder) { - return ReflectiveStreamReadConstraints.withDefaultConstraints(builder + return builder // Interning introduces excessive contention https://github.com/FasterXML/jackson-core/issues/946 .disable(JsonFactory.Feature.INTERN_FIELD_NAMES) // Canonicalization can be helpful to avoid string re-allocation, however we expect unbounded // key space due to use of maps keyed by random identifiers, which cause heavy heap churn. // See this discussion: https://github.com/FasterXML/jackson-benchmarks/pull/6 - .disable(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES)); + .disable(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES) + .streamReadConstraints(StreamReadConstraints.builder() + // 50mb up from the default 20mb as a more permissive value to begin with, which we can ratchet + // down over time. This allows us to decouple the initial risk of adopting string length limits + // from the risk introduced by taking a dependency upgrade. + .maxStringLength(50_000_000) + .build()); } } diff --git a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/PathDeserializer.java b/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/PathDeserializer.java index 236fe86828..dcc2209a08 100644 --- a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/PathDeserializer.java +++ b/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/PathDeserializer.java @@ -37,10 +37,15 @@ import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer; +import com.google.errorprone.annotations.CompileTimeConstant; +import com.palantir.logsafe.Arg; +import com.palantir.logsafe.SafeLoggable; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.List; public final class PathDeserializer extends StdScalarDeserializer { private static final long serialVersionUID = 1; @@ -58,6 +63,26 @@ public Path deserialize(JsonParser parser, DeserializationContext ctxt) throws I } // 16-Oct-2015: should we perhaps allow JSON Arrays (of Strings) as well? } - throw ctxt.mappingException(Path.class, token); + throw new SafeJsonMappingException( + "Could not deserialize path", parser, ctxt.wrongTokenException(parser, Path.class, token, null)); + } + + private static final class SafeJsonMappingException extends JsonMappingException implements SafeLoggable { + private final String logMessage; + + SafeJsonMappingException(@CompileTimeConstant String message, JsonParser parser, JsonMappingException cause) { + super(parser, message, cause); + this.logMessage = message; + } + + @Override + public String getLogMessage() { + return logMessage; + } + + @Override + public List> getArgs() { + return List.of(); + } } } diff --git a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/ReflectiveStreamReadConstraints.java b/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/ReflectiveStreamReadConstraints.java deleted file mode 100644 index f7fc25febe..0000000000 --- a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/ReflectiveStreamReadConstraints.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * (c) Copyright 2023 Palantir Technologies Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.palantir.conjure.java.serialization; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.TSFBuilder; -import com.palantir.logsafe.logger.SafeLogger; -import com.palantir.logsafe.logger.SafeLoggerFactory; -import java.lang.reflect.Method; - -/** - * This class exists to ensure default values match our expectations in cases where jackson is - * upgraded transitively prior to a CJR release which expects 2.15.0+. After this library upgrades, the - * reflection may be replaced by the following: - *
{@code
- * return builder.streamReadConstraints(StreamReadConstraints.builder()
- *         .maxStringLength(MAX_STRING_LENGTH)
- *         .build());
- * }
- */ -final class ReflectiveStreamReadConstraints { - private static final SafeLogger log = SafeLoggerFactory.get(ReflectiveStreamReadConstraints.class); - - // 50mb up from the default 5mb as a more permissive value to begin with, which we can ratchet down over time. - // This allows us to decouple the initial risk of adopting string length limits from the risk introduced by taking - // a dependency upgrade. - private static final int MAX_STRING_LENGTH = 50_000_000; - - @SuppressWarnings("unchecked") - static > B withDefaultConstraints(B builder) { - try { - // Use the same classloader which loaded the TSFBuilder - ClassLoader classLoader = builder.getClass().getClassLoader(); - Class streamReadConstraintsClass = - Class.forName("com.fasterxml.jackson.core.StreamReadConstraints", true, classLoader); - Object constraints = createConjureDefaultStreamReadConstraints(streamReadConstraintsClass); - return (B) builder.getClass() - .getMethod("streamReadConstraints", streamReadConstraintsClass) - .invoke(builder, constraints); - } catch (ClassNotFoundException cnfe) { - // Log at debug in the expected case using jackson 2.14 which does not support limits. - log.debug("StreamReadConstraints class does not exist, nothing to do", cnfe); - } catch (ReflectiveOperationException e) { - log.warn("Failed to update StreamReadConstraints, upstream default values will be used", e); - } - return builder; - } - - private static Object createConjureDefaultStreamReadConstraints(Class streamReadConstraintsClass) - throws ReflectiveOperationException { - Method builderMethod = streamReadConstraintsClass.getMethod("builder"); - Object streamReadConstraintsBuilder = builderMethod.invoke(null); - Class streamReadConstraintsBuilderClass = streamReadConstraintsBuilder.getClass(); - // Default to a max size of 50mb (up from the 5mb default) - streamReadConstraintsBuilderClass - .getMethod("maxStringLength", int.class) - .invoke(streamReadConstraintsBuilder, MAX_STRING_LENGTH); - return streamReadConstraintsBuilderClass.getMethod("build").invoke(streamReadConstraintsBuilder); - } - - private ReflectiveStreamReadConstraints() {} -} diff --git a/conjure-java-jaxrs-client/build.gradle b/conjure-java-jaxrs-client/build.gradle index cc153e04d5..7ebb83e45b 100644 --- a/conjure-java-jaxrs-client/build.gradle +++ b/conjure-java-jaxrs-client/build.gradle @@ -15,12 +15,19 @@ dependencies { api "com.palantir.dialogue:dialogue-target" implementation project(":conjure-java-annotations") + implementation 'com.fasterxml.jackson.core:jackson-annotations' + implementation 'com.fasterxml.jackson.core:jackson-core' + implementation 'com.fasterxml.jackson.core:jackson-databind' + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor' + implementation 'com.palantir.conjure.java.api:errors' + implementation 'com.palantir.conjure.java.api:service-config' implementation "com.palantir.dialogue:dialogue-apache-hc5-client" implementation "com.palantir.dialogue:dialogue-core" implementation "com.palantir.dialogue:dialogue-serde" implementation 'com.palantir.safe-logging:logger' - + implementation 'com.palantir.safe-logging:safe-logging' implementation 'com.palantir.tritium:tritium-registry' + implementation 'io.dropwizard.metrics:metrics-core' implementation project(":conjure-java-jackson-serialization") implementation "com.google.guava:guava" diff --git a/conjure-java-jersey-jakarta-server/build.gradle b/conjure-java-jersey-jakarta-server/build.gradle index 16f009e8bb..0207f805a0 100644 --- a/conjure-java-jersey-jakarta-server/build.gradle +++ b/conjure-java-jersey-jakarta-server/build.gradle @@ -8,14 +8,23 @@ dependencies { implementation 'com.palantir.tritium:tritium-registry' implementation 'io.dropwizard.metrics:metrics-core' + implementation 'com.fasterxml.jackson.core:jackson-core' + implementation 'com.fasterxml.jackson.core:jackson-databind' + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor' implementation "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider", { // activation-api should be a 'compileOnly' dependency where 'jakarta.activation' should be used at runtime exclude module: 'jakarta.activation-api' } + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.guava:guava' implementation "com.netflix.feign:feign-core" implementation "com.palantir.safe-logging:safe-logging" implementation 'com.palantir.tokens:auth-tokens' implementation "com.palantir.tracing:tracing-jersey-jakarta" + implementation 'jakarta.annotation:jakarta.annotation-api' + implementation 'jakarta.inject:jakarta.inject-api' + implementation 'jakarta.ws.rs:jakarta.ws.rs-api' + implementation 'org.glassfish.jersey.core:jersey-common' implementation project(':conjure-java-jackson-serialization') runtimeOnly "org.glassfish.jersey.ext:jersey-bean-validation" diff --git a/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java b/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java index 6069c40399..d9aafcbf97 100644 --- a/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java +++ b/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java @@ -16,6 +16,7 @@ package com.palantir.conjure.java.server.jersey; +import com.palantir.logsafe.DoNotLog; import com.palantir.logsafe.Preconditions; import com.palantir.tokens.auth.AuthHeader; import jakarta.ws.rs.HeaderParam; @@ -81,6 +82,7 @@ public AuthHeader fromString(final String value) { } } + @DoNotLog @Override public String toString(final AuthHeader value) { Preconditions.checkArgument(value != null); diff --git a/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java b/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java index 57461997d9..d52711b172 100644 --- a/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java +++ b/conjure-java-jersey-jakarta-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java @@ -16,6 +16,7 @@ package com.palantir.conjure.java.server.jersey; +import com.palantir.logsafe.DoNotLog; import com.palantir.logsafe.Preconditions; import com.palantir.tokens.auth.BearerToken; import jakarta.ws.rs.CookieParam; @@ -80,6 +81,7 @@ public BearerToken fromString(final String value) { } } + @DoNotLog @Override public String toString(final BearerToken value) { Preconditions.checkArgument(value != null); diff --git a/conjure-java-jersey-server/build.gradle b/conjure-java-jersey-server/build.gradle index abe7dde572..5bc1c09eb6 100644 --- a/conjure-java-jersey-server/build.gradle +++ b/conjure-java-jersey-server/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.palantir.external-publish-jar' apply plugin: 'com.palantir.metric-schema' -def jerseyVersion = '2.34' +def jerseyVersion = '2.40' versionsLock { disableJavaPluginDefaults() @@ -20,15 +20,25 @@ dependencies { implementation 'javax.inject:javax.inject' implementation 'com.palantir.tritium:tritium-registry' implementation 'io.dropwizard.metrics:metrics-core' + implementation 'com.fasterxml.jackson.core:jackson-core' + implementation 'com.fasterxml.jackson.core:jackson-databind' + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor' implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-cbor-provider", { // activation-api should be a compileOnly dependency where javax.activation should be used at runtime exclude module: 'javax.activation-api' } + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.guava:guava' implementation "com.netflix.feign:feign-core" implementation "com.palantir.safe-logging:safe-logging" implementation "com.palantir.safe-logging:logger" implementation 'com.palantir.tokens:auth-tokens' implementation "com.palantir.tracing:tracing-jersey" + implementation 'org.glassfish.jersey.core:jersey-common', { + version { + strictly jerseyVersion + } + } implementation project(':conjure-java-jackson-serialization') runtimeOnly "org.glassfish.jersey.ext:jersey-bean-validation", { @@ -51,3 +61,7 @@ configurations.all { exclude group: 'org.glassfish.hk2.external', module: 'jakarta.inject' } } + +checkImplicitDependencies { + ignore 'com.palantir.conjure.java.runtime', 'conjure-java-jersey-jakarta-server' +} diff --git a/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java b/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java index e682f40569..74e429cece 100644 --- a/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java +++ b/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/AuthHeaderParamConverterProvider.java @@ -16,6 +16,7 @@ package com.palantir.conjure.java.server.jersey; +import com.palantir.logsafe.DoNotLog; import com.palantir.logsafe.Preconditions; import com.palantir.tokens.auth.AuthHeader; import java.lang.annotation.Annotation; @@ -81,6 +82,7 @@ public AuthHeader fromString(final String value) { } } + @DoNotLog @Override public String toString(final AuthHeader value) { Preconditions.checkArgument(value != null); diff --git a/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java b/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java index 3c009616e0..427e70afe7 100644 --- a/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java +++ b/conjure-java-jersey-server/src/main/java/com/palantir/conjure/java/server/jersey/BearerTokenParamConverterProvider.java @@ -16,6 +16,7 @@ package com.palantir.conjure.java.server.jersey; +import com.palantir.logsafe.DoNotLog; import com.palantir.logsafe.Preconditions; import com.palantir.tokens.auth.BearerToken; import java.lang.annotation.Annotation; @@ -80,6 +81,7 @@ public BearerToken fromString(final String value) { } } + @DoNotLog @Override public String toString(final BearerToken value) { Preconditions.checkArgument(value != null); diff --git a/conjure-java-legacy-clients/build.gradle b/conjure-java-legacy-clients/build.gradle index 6d87f2e6e0..5aa9d1ba3f 100644 --- a/conjure-java-legacy-clients/build.gradle +++ b/conjure-java-legacy-clients/build.gradle @@ -6,6 +6,10 @@ dependencies { api "com.palantir.conjure.java.api:errors" implementation "com.google.guava:guava" implementation 'com.github.ben-manes.caffeine:caffeine' + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.errorprone:error_prone_annotations' + implementation 'com.palantir.safe-logging:safe-logging' + implementation 'io.dropwizard.metrics:metrics-core' annotationProcessor "org.immutables:value" compileOnly 'org.immutables:value::annotations' diff --git a/conjure-java-retrofit2-client/build.gradle b/conjure-java-retrofit2-client/build.gradle index 196a0e7336..24314e7093 100644 --- a/conjure-java-retrofit2-client/build.gradle +++ b/conjure-java-retrofit2-client/build.gradle @@ -14,6 +14,16 @@ dependencies { api "com.squareup.retrofit2:retrofit" implementation project(":conjure-java-jackson-serialization") + implementation project(':conjure-java-legacy-clients') + implementation 'com.fasterxml.jackson.core:jackson-databind' + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor' + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.guava:guava' + implementation 'com.palantir.conjure.java.api:errors' + implementation 'com.palantir.conjure.java.api:service-config' + implementation 'com.palantir.safe-logging:preconditions' + implementation 'com.palantir.safe-logging:safe-logging' + implementation 'com.squareup.okhttp3:okhttp' implementation "com.squareup.retrofit2:converter-jackson" testImplementation project(":keystores") diff --git a/conjure-java-server-verifier/src/test/java/com/palantir/verification/server/undertest/ServerUnderTestApplication.java b/conjure-java-server-verifier/src/test/java/com/palantir/verification/server/undertest/ServerUnderTestApplication.java index 0a425eb996..ffe29f8c04 100644 --- a/conjure-java-server-verifier/src/test/java/com/palantir/verification/server/undertest/ServerUnderTestApplication.java +++ b/conjure-java-server-verifier/src/test/java/com/palantir/verification/server/undertest/ServerUnderTestApplication.java @@ -17,7 +17,6 @@ package com.palantir.verification.server.undertest; import com.google.common.base.Preconditions; -import com.google.common.io.ByteStreams; import com.google.common.reflect.AbstractInvocationHandler; import com.google.common.reflect.Reflection; import com.palantir.conjure.java.server.jersey.ConjureJerseyFeature; @@ -48,7 +47,7 @@ protected Object handleInvocation(Object _proxy, Method method, Object[] args) { Preconditions.checkArgument(args.length == 1, "Expected single argument. Method: %s", method); if (args[0] instanceof BinaryAliasExample) { return (StreamingOutput) output -> - ByteStreams.copy(((BinaryAliasExample) args[0]).get().getInputStream(), output); + ((BinaryAliasExample) args[0]).get().getInputStream().transferTo(output); } else { return args[0]; } diff --git a/conjure-scala-jaxrs-client/build.gradle b/conjure-scala-jaxrs-client/build.gradle index 5244388758..b24209e854 100644 --- a/conjure-scala-jaxrs-client/build.gradle +++ b/conjure-scala-jaxrs-client/build.gradle @@ -8,5 +8,10 @@ dependencies { api "com.fasterxml.jackson.dataformat:jackson-dataformat-smile" implementation project(':conjure-java-jackson-serialization') + implementation project(':conjure-java-legacy-clients') + implementation project(':extras:refresh-utils') implementation 'com.fasterxml.jackson.module:jackson-module-scala_2.12' + implementation 'com.google.guava:guava' + implementation 'com.palantir.conjure.java.api:service-config' + implementation 'com.palantir.conjure.java.runtime:client-config' } diff --git a/keystores/build.gradle b/keystores/build.gradle index 2cb588fcad..e371df1c30 100644 --- a/keystores/build.gradle +++ b/keystores/build.gradle @@ -8,10 +8,15 @@ apply plugin: 'com.palantir.revapi' dependencies { api "com.fasterxml.jackson.core:jackson-databind" api "com.palantir.conjure.java.api:ssl-config" + implementation 'com.fasterxml.jackson.core:jackson-annotations' + implementation "com.github.ben-manes.caffeine:caffeine" + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.errorprone:error_prone_annotations' implementation "com.google.guava:guava" implementation 'com.palantir.safe-logging:logger' implementation "com.palantir.safe-logging:preconditions" - implementation "com.github.ben-manes.caffeine:caffeine" + implementation 'com.palantir.safe-logging:safe-logging' + testImplementation project(":conjure-java-jackson-serialization") testImplementation "org.conscrypt:conscrypt-openjdk-uber" diff --git a/keystores/src/main/java/com/palantir/conjure/java/config/ssl/DefaultCas.java b/keystores/src/main/java/com/palantir/conjure/java/config/ssl/DefaultCas.java index 759876a76c..9733b8c0d5 100644 --- a/keystores/src/main/java/com/palantir/conjure/java/config/ssl/DefaultCas.java +++ b/keystores/src/main/java/com/palantir/conjure/java/config/ssl/DefaultCas.java @@ -41,7 +41,7 @@ final class DefaultCas { /** * This is managed by an excavator. */ - private static final String CA_CERTIFICATES_CRT = "ca-certificates.crt"; + private static final String CA_CERTIFICATES_CRT = "/ca-certificates.crt"; private static final Supplier> TRUSTED_CERTIFICATES = Suppliers.memoize(DefaultCas::getTrustedCertificates); @@ -53,8 +53,8 @@ static Map getCertificates() { private static Map getTrustedCertificates() { ImmutableMap.Builder certificateMap = ImmutableMap.builder(); try { - List caCertificates = KeyStores.readX509Certificates( - new ByteArrayInputStream(Resources.toByteArray(Resources.getResource(CA_CERTIFICATES_CRT)))) + List caCertificates = KeyStores.readX509Certificates(new ByteArrayInputStream( + Resources.toByteArray(Resources.getResource(DefaultCas.class, CA_CERTIFICATES_CRT)))) .stream() .map(cert -> (X509Certificate) cert) .collect(Collectors.toList()); diff --git a/okhttp-clients/build.gradle b/okhttp-clients/build.gradle index 1f605fcc81..679a975709 100644 --- a/okhttp-clients/build.gradle +++ b/okhttp-clients/build.gradle @@ -9,14 +9,22 @@ dependencies { api project(':conjure-java-legacy-clients') api "com.palantir.conjure.java.api:errors" implementation project(':conjure-java-jackson-serialization') + implementation 'com.fasterxml.jackson.core:jackson-databind' + implementation 'com.google.code.findbugs:jsr305' implementation 'com.google.guava:guava' implementation 'com.netflix.concurrency-limits:concurrency-limits-core' + implementation 'com.palantir.conjure.java.api:service-config' implementation 'com.palantir.safe-logging:logger' implementation 'com.palantir.safe-logging:preconditions' + implementation 'com.palantir.safe-logging:safe-logging' + implementation 'com.palantir.tracing:tracing' + implementation 'com.palantir.tracing:tracing-api' implementation 'com.palantir.tracing:tracing-okhttp3' implementation 'com.palantir.tritium:tritium-registry' implementation 'com.palantir.tritium:tritium-metrics' implementation 'io.dropwizard.metrics:metrics-core' + implementation 'com.squareup.okhttp3:okhttp' + implementation 'com.squareup.okio:okio-jvm' testImplementation project(":keystores") testImplementation 'com.palantir.safe-logging:preconditions-assertj' diff --git a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ForwardingOkHttpClient.java b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ForwardingOkHttpClient.java deleted file mode 100644 index e10376a9ca..0000000000 --- a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ForwardingOkHttpClient.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * (c) Copyright 2017 Palantir Technologies Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.palantir.conjure.java.okhttp; - -import java.net.Proxy; -import java.net.ProxySelector; -import java.util.List; -import javax.net.SocketFactory; -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.SSLSocketFactory; -import okhttp3.Authenticator; -import okhttp3.Cache; -import okhttp3.Call; -import okhttp3.CertificatePinner; -import okhttp3.ConnectionPool; -import okhttp3.ConnectionSpec; -import okhttp3.CookieJar; -import okhttp3.Dispatcher; -import okhttp3.Dns; -import okhttp3.Interceptor; -import okhttp3.OkHttpClient; -import okhttp3.Protocol; -import okhttp3.Request; -import okhttp3.WebSocket; -import okhttp3.WebSocketListener; - -/** A forwarding/delegating {@link okhttp3.OkHttpClient}. Sub-classes should override individual methods. */ -class ForwardingOkHttpClient extends OkHttpClient { - - private final OkHttpClient delegate; - - ForwardingOkHttpClient(OkHttpClient delegate) { - this.delegate = delegate; - } - - protected OkHttpClient getDelegate() { - return delegate; - } - - @Override - public int connectTimeoutMillis() { - return delegate.connectTimeoutMillis(); - } - - @Override - public int readTimeoutMillis() { - return delegate.readTimeoutMillis(); - } - - @Override - public int writeTimeoutMillis() { - return delegate.writeTimeoutMillis(); - } - - @Override - public int pingIntervalMillis() { - return delegate.pingIntervalMillis(); - } - - @Override - public Proxy proxy() { - return delegate.proxy(); - } - - @Override - public ProxySelector proxySelector() { - return delegate.proxySelector(); - } - - @Override - public CookieJar cookieJar() { - return delegate.cookieJar(); - } - - @Override - public Cache cache() { - return delegate.cache(); - } - - @Override - public Dns dns() { - return delegate.dns(); - } - - @Override - public SocketFactory socketFactory() { - return delegate.socketFactory(); - } - - @Override - public SSLSocketFactory sslSocketFactory() { - return delegate.sslSocketFactory(); - } - - @Override - public HostnameVerifier hostnameVerifier() { - return delegate.hostnameVerifier(); - } - - @Override - public CertificatePinner certificatePinner() { - return delegate.certificatePinner(); - } - - @Override - public Authenticator authenticator() { - return delegate.authenticator(); - } - - @Override - public Authenticator proxyAuthenticator() { - return delegate.proxyAuthenticator(); - } - - @Override - public ConnectionPool connectionPool() { - return delegate.connectionPool(); - } - - @Override - public boolean followSslRedirects() { - return delegate.followSslRedirects(); - } - - @Override - public boolean followRedirects() { - return delegate.followRedirects(); - } - - @Override - public boolean retryOnConnectionFailure() { - return delegate.retryOnConnectionFailure(); - } - - @Override - public Dispatcher dispatcher() { - return delegate.dispatcher(); - } - - @Override - public List protocols() { - return delegate.protocols(); - } - - @Override - public List connectionSpecs() { - return delegate.connectionSpecs(); - } - - @Override - public List interceptors() { - return delegate.interceptors(); - } - - @Override - public List networkInterceptors() { - return delegate.networkInterceptors(); - } - - @Override - public Call newCall(Request request) { - return delegate.newCall(request); - } - - @Override - public WebSocket newWebSocket(Request request, WebSocketListener listener) { - return delegate.newWebSocket(request, listener); - } - - @Override - public Builder newBuilder() { - return delegate.newBuilder(); - } -} diff --git a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/OkHttpClients.java b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/OkHttpClients.java index 2e2a75e47f..93b7145cee 100644 --- a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/OkHttpClients.java +++ b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/OkHttpClients.java @@ -292,7 +292,7 @@ private static RemotingOkHttpClient createInternal( .addMetrics("from", DispatcherMetricSet.class.getSimpleName(), dispatcherMetricSet); return new RemotingOkHttpClient( - client.build(), + client, backoffStrategyFunction, config.nodeSelectionStrategy(), urlSelector, diff --git a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/Okhttp39HostnameVerifier.java b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/Okhttp39HostnameVerifier.java index 3c3b9d1d8e..36fa8687c7 100644 --- a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/Okhttp39HostnameVerifier.java +++ b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/Okhttp39HostnameVerifier.java @@ -32,8 +32,6 @@ */ package com.palantir.conjure.java.okhttp; -import static okhttp3.internal.Util.verifyAsIpAddress; - import java.security.cert.Certificate; import java.security.cert.CertificateParsingException; import java.security.cert.X509Certificate; @@ -46,6 +44,7 @@ import javax.net.ssl.SSLException; import javax.net.ssl.SSLSession; import javax.security.auth.x500.X500Principal; +import okhttp3.internal.Util; /** * A HostnameVerifier consistent with RFC 2818. @@ -79,7 +78,7 @@ public boolean verify(String host, SSLSession session) { } public boolean verify(String host, X509Certificate certificate) { - return verifyAsIpAddress(host) ? verifyIpAddress(host, certificate) : verifyHostname(host, certificate); + return Util.canParseAsIpAddress(host) ? verifyIpAddress(host, certificate) : verifyHostname(host, certificate); } /** Returns true if {@code certificate} matches {@code ipAddress}. */ diff --git a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpCall.java b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpCall.java index b08f020429..972afc1913 100644 --- a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpCall.java +++ b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpCall.java @@ -51,7 +51,6 @@ import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; -import okhttp3.internal.http.UnrepeatableRequestBody; /** * An OkHttp {@link Call} implementation that handles standard retryable error status such as 308, 429, 503, and @@ -586,7 +585,7 @@ private static void retryIfAllowed(Callback callback, Call call, Exception excep } private static boolean isStreamingBody(Call call) { - return call.request().body() instanceof UnrepeatableRequestBody; + return call.request().body() != null && call.request().body().isOneShot(); } private static boolean shouldPropagateQos(ClientConfiguration.ServerQoS serverQoS) { diff --git a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpClient.java b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpClient.java index e51dcacb87..9102809aa0 100644 --- a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpClient.java +++ b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/RemotingOkHttpClient.java @@ -37,7 +37,7 @@ * An {@link OkHttpClient} that executes {@link okhttp3.Call}s as {@link RemotingOkHttpCall}s in order to retry a class * of retryable error states. */ -final class RemotingOkHttpClient extends ForwardingOkHttpClient { +final class RemotingOkHttpClient extends OkHttpClient { private static final SafeLogger log = SafeLoggerFactory.get(RemotingOkHttpClient.class); private static final int MAX_NUM_RELOCATIONS = 20; @@ -53,7 +53,7 @@ final class RemotingOkHttpClient extends ForwardingOkHttpClient { private final ClientConfiguration.RetryOnSocketException retryOnSocketException; RemotingOkHttpClient( - OkHttpClient delegate, + OkHttpClient.Builder builder, Supplier backoffStrategy, NodeSelectionStrategy nodeSelectionStrategy, UrlSelector urls, @@ -63,7 +63,7 @@ final class RemotingOkHttpClient extends ForwardingOkHttpClient { ClientConfiguration.ServerQoS serverQoS, ClientConfiguration.RetryOnTimeout retryOnTimeout, ClientConfiguration.RetryOnSocketException retryOnSocketException) { - super(delegate); + super(builder); this.backoffStrategyFactory = backoffStrategy; this.nodeSelectionStrategy = nodeSelectionStrategy; this.urls = urls; @@ -93,7 +93,7 @@ public Builder newBuilder() { RemotingOkHttpCall newCallWithMutableState( Request request, BackoffStrategy backoffStrategy, int maxNumRelocations, Optional previousCall) { return new RemotingOkHttpCall( - getDelegate().newCall(request), + super.newCall(request), previousCall, backoffStrategy, urls, diff --git a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/OkHttpClientsTest.java b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/OkHttpClientsTest.java index ac55ccbd26..a2477a3206 100644 --- a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/OkHttpClientsTest.java +++ b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/OkHttpClientsTest.java @@ -65,7 +65,6 @@ import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; -import okhttp3.internal.http.UnrepeatableRequestBody; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.SocketPolicy; @@ -176,7 +175,7 @@ public void streamingRequestBodyIsNotRetried() throws IOException { assertThat(body.retried).hasValue(0); } - private static final class StreamingRequestBody extends RequestBody implements UnrepeatableRequestBody { + private static final class StreamingRequestBody extends RequestBody { private static final MediaType OCTET_STREAM = MediaType.parse("application/octet-stream"); private final Source source; @@ -203,6 +202,11 @@ public void writeTo(BufferedSink sink) throws IOException { } } } + + @Override + public boolean isOneShot() { + return true; + } } private static final class StreamReusedException extends IOException { diff --git a/undertow-jakarta-testing/build.gradle b/undertow-jakarta-testing/build.gradle index ffbddd3d27..f34d7baf9f 100644 --- a/undertow-jakarta-testing/build.gradle +++ b/undertow-jakarta-testing/build.gradle @@ -16,9 +16,17 @@ dependencies { api 'jakarta.servlet:jakarta.servlet-api' api 'org.apache.httpcomponents.client5:httpclient5' implementation project(':conjure-java-jackson-serialization') + implementation 'com.fasterxml.jackson.core:jackson-databind' + implementation 'com.google.errorprone:error_prone_annotations' implementation 'com.palantir.safe-logging:preconditions' - implementation 'org.glassfish.jersey.core:jersey-server' + implementation 'com.palantir.safe-logging:safe-logging' + implementation 'jakarta.ws.rs:jakarta.ws.rs-api' + implementation 'org.apache.httpcomponents.core5:httpcore5' implementation 'org.glassfish.jersey.containers:jersey-container-servlet-core' + implementation 'org.glassfish.jersey.core:jersey-common' + implementation 'org.glassfish.jersey.core:jersey-server' implementation 'org.glassfish.jersey.media:jersey-media-json-jackson' + implementation 'org.jboss.xnio:xnio-api' + implementation 'org.junit.jupiter:junit-jupiter-api' } diff --git a/versions.lock b/versions.lock index ddb9514ab2..400747bfa9 100644 --- a/versions.lock +++ b/versions.lock @@ -1,138 +1,144 @@ # Run ./gradlew --write-locks to regenerate this file com.fasterxml:classmate:1.5.1 (1 constraints: 9a122a13) -com.fasterxml.jackson.core:jackson-annotations:2.15.2 (9 constraints: 42b6b164) -com.fasterxml.jackson.core:jackson-core:2.15.2 (13 constraints: 0526d599) -com.fasterxml.jackson.core:jackson-databind:2.15.2 (20 constraints: d58ca97a) -com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.15.2 (2 constraints: 2e20bb05) -com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.15.2 (1 constraints: 3905393b) -com.fasterxml.jackson.datatype:jackson-datatype-guava:2.15.2 (1 constraints: 3905393b) -com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.2 (1 constraints: 3905393b) -com.fasterxml.jackson.datatype:jackson-datatype-joda:2.15.2 (1 constraints: 3905393b) -com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2 (1 constraints: 3905393b) -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:2.15.2 (1 constraints: f61afc42) -com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider:2.15.2 (1 constraints: 3905393b) -com.fasterxml.jackson.module:jackson-module-afterburner:2.15.2 (1 constraints: 3905393b) -com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.15.2 (2 constraints: e430cfb3) -com.fasterxml.jackson.module:jackson-module-scala_2.12:2.15.2 (1 constraints: 3905393b) -com.github.ben-manes.caffeine:caffeine:3.1.8 (3 constraints: ee2386a4) +com.fasterxml.jackson.core:jackson-annotations:2.15.3 (11 constraints: a1cb712a) +com.fasterxml.jackson.core:jackson-core:2.15.3 (15 constraints: 6c3b4d55) +com.fasterxml.jackson.core:jackson-databind:2.15.3 (20 constraints: e68c0da3) +com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.15.3 (2 constraints: 2f20bc05) +com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.15.3 (1 constraints: 3905393b) +com.fasterxml.jackson.datatype:jackson-datatype-guava:2.15.3 (1 constraints: 3905393b) +com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.3 (1 constraints: 3905393b) +com.fasterxml.jackson.datatype:jackson-datatype-joda:2.15.3 (1 constraints: 3905393b) +com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.3 (1 constraints: 3905393b) +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:2.15.3 (1 constraints: f71afd42) +com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider:2.15.3 (1 constraints: 3905393b) +com.fasterxml.jackson.module:jackson-module-afterburner:2.15.3 (1 constraints: 3905393b) +com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.15.3 (2 constraints: e4300fb4) +com.fasterxml.jackson.module:jackson-module-scala_2.12:2.15.3 (1 constraints: 3905393b) +com.github.ben-manes.caffeine:caffeine:3.1.8 (3 constraints: f223e4a4) com.google.code.findbugs:jsr305:3.0.2 (15 constraints: 9de5277d) -com.google.errorprone:error_prone_annotations:2.7.1 (16 constraints: eaf9bd29) +com.google.errorprone:error_prone_annotations:2.7.1 (16 constraints: e5f9191d) com.google.guava:failureaccess:1.0.1 (1 constraints: 140ae1b4) -com.google.guava:guava:32.1.2-jre (15 constraints: b907650e) +com.google.guava:guava:32.1.3-jre (15 constraints: f909e26b) com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (1 constraints: bd17c918) com.google.j2objc:j2objc-annotations:2.8 (1 constraints: be09f5a0) com.netflix.concurrency-limits:concurrency-limits-core:0.2.2 (1 constraints: 0605f335) com.netflix.feign:feign-core:8.18.0 (2 constraints: 1213df52) com.netflix.feign:feign-jackson:8.18.0 (1 constraints: 43056b3b) -com.palantir.conjure.java:conjure-lib:7.16.0 (3 constraints: 62252350) -com.palantir.conjure.java.api:errors:2.35.0 (3 constraints: 3225144a) -com.palantir.conjure.java.api:service-config:2.35.0 (3 constraints: a42895e2) -com.palantir.conjure.java.api:ssl-config:2.35.0 (2 constraints: ff178486) -com.palantir.dialogue:dialogue-apache-hc5-client:3.90.0 (1 constraints: 3e05553b) -com.palantir.dialogue:dialogue-blocking-channels:3.90.0 (2 constraints: d72335b3) -com.palantir.dialogue:dialogue-core:3.90.0 (2 constraints: 3d19d8ed) -com.palantir.dialogue:dialogue-futures:3.90.0 (3 constraints: cb3374bd) -com.palantir.dialogue:dialogue-serde:3.90.0 (1 constraints: 3e05553b) -com.palantir.dialogue:dialogue-target:3.90.0 (5 constraints: 074d285c) -com.palantir.refreshable:refreshable:2.2.0 (1 constraints: 0605fb35) +com.palantir.conjure.java:conjure-lib:7.21.0 (3 constraints: 5a253c4e) +com.palantir.conjure.java.api:errors:2.38.0 (3 constraints: 3b25d04b) +com.palantir.conjure.java.api:service-config:2.38.0 (3 constraints: ad286ce4) +com.palantir.conjure.java.api:ssl-config:2.38.0 (2 constraints: 05183887) +com.palantir.dialogue:dialogue-apache-hc5-client:3.100.0 (1 constraints: 66059d40) +com.palantir.dialogue:dialogue-blocking-channels:3.100.0 (2 constraints: 272478f2) +com.palantir.dialogue:dialogue-core:3.100.0 (2 constraints: 8d19ae15) +com.palantir.dialogue:dialogue-futures:3.100.0 (3 constraints: 4334c73f) +com.palantir.dialogue:dialogue-serde:3.100.0 (1 constraints: 66059d40) +com.palantir.dialogue:dialogue-target:3.100.0 (5 constraints: cf4d7681) +com.palantir.nylon:nylon-threads:0.4.0 (1 constraints: 0c10fa91) +com.palantir.refreshable:refreshable:2.3.0 (1 constraints: 0705fe35) com.palantir.ri:resource-identifier:2.6.0 (3 constraints: aa2f1337) -com.palantir.safe-logging:logger:3.6.0 (12 constraints: 7fb8c805) +com.palantir.safe-logging:logger:3.6.0 (13 constraints: 9dc69a31) com.palantir.safe-logging:logger-slf4j:3.6.0 (1 constraints: 040e6542) com.palantir.safe-logging:logger-spi:3.6.0 (2 constraints: 171e6d7b) -com.palantir.safe-logging:preconditions:3.6.0 (18 constraints: df1d7b97) -com.palantir.safe-logging:safe-logging:3.6.0 (17 constraints: 6c0cf595) +com.palantir.safe-logging:preconditions:3.6.0 (19 constraints: 012cb786) +com.palantir.safe-logging:safe-logging:3.6.0 (19 constraints: a82ad682) com.palantir.safethreadlocalrandom:safe-thread-local-random:0.1.0 (3 constraints: 933225f9) -com.palantir.tokens:auth-tokens:3.18.0 (5 constraints: 47482351) +com.palantir.tokens:auth-tokens:3.18.0 (5 constraints: 48488351) com.palantir.tracing:tracing:6.18.0 (7 constraints: 866f3e47) -com.palantir.tracing:tracing-api:6.18.0 (5 constraints: b9521ea8) +com.palantir.tracing:tracing-api:6.18.0 (6 constraints: f957c8cf) com.palantir.tracing:tracing-jersey-jakarta:6.18.0 (1 constraints: 41055f3b) com.palantir.tracing:tracing-okhttp3:6.18.0 (1 constraints: 41055f3b) -com.palantir.tritium:tritium-api:0.74.0 (2 constraints: 371f74bd) -com.palantir.tritium:tritium-core:0.74.0 (1 constraints: 431050a2) -com.palantir.tritium:tritium-metrics:0.74.0 (5 constraints: fa4ca157) -com.palantir.tritium:tritium-registry:0.74.0 (6 constraints: 3c5d81cf) -com.squareup.okhttp3:okhttp:3.13.1 (4 constraints: 2e38ea61) -com.squareup.okio:okio:1.17.2 (1 constraints: 850cc309) +com.palantir.tritium:tritium-api:0.79.0 (2 constraints: 411f78be) +com.palantir.tritium:tritium-core:0.79.0 (1 constraints: 48105fa2) +com.palantir.tritium:tritium-metrics:0.79.0 (5 constraints: 1b4de163) +com.palantir.tritium:tritium-registry:0.79.0 (6 constraints: 625dbee1) +com.squareup.okhttp3:okhttp:4.12.0 (4 constraints: 613279d8) +com.squareup.okio:okio:3.6.0 (1 constraints: 530c38fd) +com.squareup.okio:okio-jvm:3.6.0 (1 constraints: 500ad3b9) com.squareup.retrofit2:converter-jackson:2.4.0 (1 constraints: 08050136) com.squareup.retrofit2:retrofit:2.4.0 (2 constraints: 4b1d8704) -com.sun.activation:jakarta.activation:2.0.1 (1 constraints: 8c0f4591) com.thoughtworks.paranamer:paranamer:2.8 (1 constraints: 7b15b5d4) -io.dropwizard.metrics:metrics-core:4.2.19 (6 constraints: 6c59a37b) -jakarta.annotation:jakarta.annotation-api:2.0.0 (4 constraints: f0361843) -jakarta.el:jakarta.el-api:4.0.0 (2 constraints: e81e979a) +io.dropwizard.metrics:metrics-core:4.2.21 (6 constraints: 4959dc6e) +jakarta.activation:jakarta.activation-api:2.1.0 (1 constraints: 8c0f4791) +jakarta.annotation:jakarta.annotation-api:2.1.1 (4 constraints: f4368043) +jakarta.el:jakarta.el-api:5.0.1 (2 constraints: eb1eda9a) jakarta.inject:jakarta.inject-api:2.0.1 (5 constraints: 82605b36) -jakarta.validation:jakarta.validation-api:3.0.0 (2 constraints: f6242ee0) -jakarta.ws.rs:jakarta.ws.rs-api:3.1.0 (8 constraints: 868cd469) -jakarta.xml.bind:jakarta.xml.bind-api:3.0.1 (2 constraints: 3a33edc3) +jakarta.validation:jakarta.validation-api:3.0.2 (2 constraints: fa24a2e0) +jakarta.ws.rs:jakarta.ws.rs-api:3.1.0 (8 constraints: 8c8c036d) +jakarta.xml.bind:jakarta.xml.bind-api:4.0.0 (2 constraints: 3a33f1c3) joda-time:joda-time:2.10.14 (1 constraints: 5b160f08) org.apache.httpcomponents.client5:httpclient5:5.2.1 (2 constraints: d518b1c3) -org.apache.httpcomponents.core5:httpcore5:5.2.2 (3 constraints: a038a439) +org.apache.httpcomponents.core5:httpcore5:5.2.3 (3 constraints: a1380c3a) org.apache.httpcomponents.core5:httpcore5-h2:5.2 (1 constraints: dd12c315) -org.checkerframework:checker-qual:3.37.0 (3 constraints: bb1f2d54) -org.glassfish:jakarta.el:4.0.2 (1 constraints: fe135865) -org.glassfish.hk2:hk2-api:3.0.3 (1 constraints: 6b0c570c) -org.glassfish.hk2:hk2-locator:3.0.3 (1 constraints: 4110d5ad) -org.glassfish.hk2:hk2-utils:3.0.3 (2 constraints: 1b17aa76) +org.checkerframework:checker-qual:3.40.0 (3 constraints: b91f4852) +org.glassfish:jakarta.el:5.0.0-M1 (1 constraints: a814a4a2) +org.glassfish.hk2:hk2-api:3.0.4 (1 constraints: 6c0c580c) +org.glassfish.hk2:hk2-locator:3.0.4 (1 constraints: 4210d6ad) +org.glassfish.hk2:hk2-utils:3.0.4 (2 constraints: 1d17d276) org.glassfish.hk2:osgi-resource-locator:1.0.3 (1 constraints: ef10e7c2) -org.glassfish.hk2.external:aopalliance-repackaged:3.0.3 (2 constraints: 1b17aa76) -org.glassfish.jersey.core:jersey-client:3.0.6 (1 constraints: 0211bfc3) -org.glassfish.jersey.core:jersey-common:3.0.6 (6 constraints: ae75ae9b) -org.glassfish.jersey.core:jersey-server:3.0.6 (4 constraints: 374500ac) -org.glassfish.jersey.ext:jersey-bean-validation:3.0.6 (1 constraints: 0b050036) -org.glassfish.jersey.inject:jersey-hk2:3.0.6 (1 constraints: 0b050036) +org.glassfish.hk2.external:aopalliance-repackaged:3.0.4 (2 constraints: 1d17d276) +org.glassfish.jersey.core:jersey-client:3.1.3 (1 constraints: 0011bfc3) +org.glassfish.jersey.core:jersey-common:3.1.3 (7 constraints: aa7a1d48) +org.glassfish.jersey.core:jersey-server:3.1.3 (4 constraints: 31452caa) +org.glassfish.jersey.ext:jersey-bean-validation:3.1.3 (1 constraints: 09050036) +org.glassfish.jersey.inject:jersey-hk2:3.1.3 (1 constraints: 09050036) org.hdrhistogram:HdrHistogram:2.1.12 (1 constraints: 3e103aa2) -org.hibernate.validator:hibernate-validator:7.0.1.Final (1 constraints: 1816f4e3) -org.immutables:value:2.9.3 (1 constraints: 10051336) -org.javassist:javassist:3.28.0-GA (1 constraints: 2d1120f1) -org.jboss.logging:jboss-logging:3.4.1.Final (4 constraints: a24557a8) -org.jetbrains:annotations:24.0.1 (2 constraints: fc20bc6d) +org.hibernate.validator:hibernate-validator:8.0.1.Final (1 constraints: 1916ffe3) +org.immutables:value:2.10.0 (1 constraints: 35052f3b) +org.javassist:javassist:3.29.2-GA (1 constraints: 30112ef1) +org.jboss.logging:jboss-logging:3.5.0.Final (4 constraints: 0747c0c6) +org.jboss.threads:jboss-threads:3.5.0.Final (3 constraints: b52a2fe5) +org.jetbrains:annotations:24.0.1 (3 constraints: da2fbd33) +org.jetbrains.kotlin:kotlin-stdlib:1.9.10 (2 constraints: c2210fe1) +org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10 (2 constraints: 3f1b4b83) +org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10 (1 constraints: e210ffd2) +org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 (3 constraints: eb27efa7) org.jvnet:animal-sniffer-annotation:1.0 (1 constraints: f20b95eb) org.mpierce.metrics.reservoir:hdrhistogram-metrics-reservoir:1.1.3 (1 constraints: 0d10f991) org.scala-lang:scala-library:2.12.17 (1 constraints: 3c16782c) org.slf4j:slf4j-api:1.7.36 (8 constraints: 4e7ba54e) +org.wildfly.common:wildfly-common:1.5.4.Final (2 constraints: 741cfbf1) [Test dependencies] -com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2 (1 constraints: 3905393b) +com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.3 (1 constraints: 3905393b) com.google.code.findbugs:annotations:3.0.1 (1 constraints: 9e0aafc3) com.palantir.safe-logging:preconditions-assertj:3.6.0 (1 constraints: 0b050c36) -com.squareup.okhttp3:mockwebserver:3.13.1 (1 constraints: 3a053f3b) +com.squareup.okhttp3:mockwebserver:4.12.0 (1 constraints: 3905413b) io.leangen.geantyref:geantyref:1.3.4 (1 constraints: 0a05fd35) io.reactivex.rxjava2:rxjava:2.2.21 (1 constraints: 3905363b) io.undertow:undertow-core:2.2.24.Final (2 constraints: a619e9ea) io.undertow:undertow-servlet-jakarta:2.2.20.Final (1 constraints: 50071361) jakarta.servlet:jakarta.servlet-api:5.0.0 (2 constraints: 1015bdac) -junit:junit:4.12 (1 constraints: 080f065e) -net.bytebuddy:byte-buddy:1.14.5 (2 constraints: c116a74f) -net.bytebuddy:byte-buddy-agent:1.14.5 (1 constraints: 450b43de) +junit:junit:4.13.2 (1 constraints: 690fa77c) +net.bytebuddy:byte-buddy:1.14.9 (2 constraints: c516ab4f) +net.bytebuddy:byte-buddy-agent:1.14.9 (1 constraints: 490b47de) net.jcip:jcip-annotations:1.0 (1 constraints: 560ff165) org.apache-extras.beanshell:bsh:2.0b6 (1 constraints: ac07626b) org.apache.commons:commons-lang3:3.13.0 (1 constraints: 39053e3b) org.apiguardian:apiguardian-api:1.1.2 (5 constraints: 105480ac) org.assertj:assertj-core:3.24.2 (2 constraints: 9c1928df) org.conscrypt:conscrypt-openjdk-uber:2.5.2 (1 constraints: 0b050636) -org.glassfish.jersey.containers:jersey-container-servlet-core:3.0.6 (1 constraints: 0b050036) -org.glassfish.jersey.ext:jersey-entity-filtering:3.0.6 (1 constraints: bf1525d3) -org.glassfish.jersey.media:jersey-media-json-jackson:3.0.6 (1 constraints: 0b050036) +org.glassfish.jersey.containers:jersey-container-servlet-core:3.1.3 (1 constraints: 09050036) +org.glassfish.jersey.ext:jersey-entity-filtering:3.1.3 (1 constraints: bd1525d3) +org.glassfish.jersey.media:jersey-media-json-jackson:3.1.3 (1 constraints: 09050036) org.hamcrest:hamcrest:2.1 (2 constraints: 8512932d) org.hamcrest:hamcrest-core:2.1 (2 constraints: 88126e10) org.hamcrest:hamcrest-library:2.1 (1 constraints: 1507415c) -org.jboss.threads:jboss-threads:3.1.0.Final (2 constraints: 561a9b42) org.jboss.xnio:xnio-api:3.8.7.Final (2 constraints: 771a3146) org.jboss.xnio:xnio-nio:3.8.7.Final (1 constraints: c80dcb30) org.jmock:jmock:2.12.0 (1 constraints: 3705353b) org.jmock:jmock-testjar:2.12.0 (1 constraints: a507a272) -org.junit.jupiter:junit-jupiter:5.10.0 (1 constraints: 3805413b) -org.junit.jupiter:junit-jupiter-api:5.10.0 (5 constraints: ed435769) -org.junit.jupiter:junit-jupiter-engine:5.10.0 (1 constraints: 330efd49) -org.junit.jupiter:junit-jupiter-params:5.10.0 (2 constraints: 6a131c5b) -org.junit.platform:junit-platform-commons:1.10.0 (2 constraints: 2b211983) -org.junit.platform:junit-platform-engine:1.10.0 (1 constraints: d210e4c4) -org.mockito:mockito-core:5.4.0 (2 constraints: ce135265) -org.mockito:mockito-junit-jupiter:5.4.0 (1 constraints: 0b051036) +org.junit.jupiter:junit-jupiter:5.10.1 (1 constraints: 3905423b) +org.junit.jupiter:junit-jupiter-api:5.10.1 (5 constraints: 164419af) +org.junit.jupiter:junit-jupiter-engine:5.10.1 (1 constraints: 340efe49) +org.junit.jupiter:junit-jupiter-params:5.10.1 (2 constraints: 6c13475b) +org.junit.platform:junit-platform-commons:1.10.1 (2 constraints: 2d214d83) +org.junit.platform:junit-platform-engine:1.10.1 (1 constraints: d310e5c4) +org.mockito:mockito-core:5.7.0 (2 constraints: d413e265) +org.mockito:mockito-junit-jupiter:5.7.0 (1 constraints: 0e051936) org.objenesis:objenesis:3.3 (1 constraints: b20a14bd) org.opentest4j:opentest4j:1.3.0 (2 constraints: cf209249) org.ow2.asm:asm:7.1 (1 constraints: 1a07505c) org.reactivestreams:reactive-streams:1.0.3 (1 constraints: 1f0c60f9) org.wildfly.client:wildfly-client-config:1.0.1.Final (1 constraints: 940c6308) -org.wildfly.common:wildfly-common:1.5.4.Final (2 constraints: 741cfbf1) -org.yaml:snakeyaml:2.0 (1 constraints: 3a178910) +org.yaml:snakeyaml:2.1 (1 constraints: 3b178a10) diff --git a/versions.props b/versions.props index 551229c318..219166d696 100644 --- a/versions.props +++ b/versions.props @@ -1,25 +1,26 @@ -com.fasterxml.jackson.core:jackson-databind = 2.15.2 +com.fasterxml.jackson.core:jackson-databind = 2.15.3 com.github.ben-manes.caffeine:caffeine = 3.1.8 com.google.code.findbugs:jsr305 = 3.0.2 -com.google.guava:guava = 32.1.2-jre +com.google.guava:guava = 32.1.3-jre com.netflix.concurrency-limits:* = 0.2.2 com.netflix.feign:feign-*= 8.18.0 -com.palantir.conjure.java:* = 7.16.0 -com.palantir.conjure.java:conjure-lib = 7.16.0 -com.palantir.conjure.java.api:* = 2.35.0 +com.palantir.conjure.java:* = 7.21.0 +com.palantir.conjure.java:conjure-lib = 7.21.0 +com.palantir.conjure.java.api:* = 2.38.0 com.palantir.conjure.verification:* = 0.19.0 -com.palantir.dialogue:* = 3.90.0 +com.palantir.dialogue:* = 3.100.0 com.palantir.safe-logging:* = 3.6.0 com.palantir.tokens:* = 3.18.0 com.palantir.tracing:* = 6.18.0 -com.palantir.tritium:* = 0.74.0 +com.palantir.tritium:* = 0.79.0 +com.squareup.okhttp3:* = 4.12.0 io.reactivex.rxjava2:rxjava = 2.2.21 org.apache.commons:commons-lang3 = 3.13.0 org.assertj:assertj-core = 3.24.2 -org.immutables:value = 2.9.3 +org.immutables:value = 2.10.0 org.jmock:jmock = 2.12.0 -org.junit.*:* = 5.10.0 -org.mockito:* = 5.4.0 +org.junit.*:* = 5.10.1 +org.mockito:* = 5.7.0 org.slf4j:* = 1.7.36 io.leangen.geantyref:geantyref = 1.3.4 io.undertow:* = 2.2.24.Final @@ -29,9 +30,9 @@ io.undertow:* = 2.2.24.Final # here to enable existing test coverage. io.undertow:undertow-servlet-jakarta = 2.2.20.Final # dependency-upgrader:ON -com.palantir.refreshable:refreshable = 2.2.0 +com.palantir.refreshable:refreshable = 2.3.0 org.hibernate.validator:* = 6.2.0.Final -org.checkerframework:checker-qual = 3.37.0 +org.checkerframework:checker-qual = 3.40.0 org.apache.httpcomponents.client5:* = 5.2.1 @@ -39,7 +40,7 @@ org.apache.httpcomponents.client5:* = 5.2.1 jakarta.servlet:jakarta.servlet-api = 5.0.0 jakarta.ws.rs:jakarta.ws.rs-api = 3.1.0 jakarta.annotation:jakarta.annotation-api = 2.0.0 -org.glassfish.jersey.*:* = 3.0.6 +org.glassfish.jersey.*:* = 3.1.3 # for version locks on legacy javax versions javax.annotation:javax.annotation-api = 1.3.2 @@ -50,9 +51,6 @@ javax.inject:javax.inject = 1 com.fasterxml.jackson.*:* = 2.13.1 -# Temporarily pausing until internal libraries stop relying on UnrepeatableRequestBody -com.squareup.okhttp3:* = 3.13.1 - # We cannot upgrade retrofit2 to 2.5.0 because of https://github.com/palantir/conjure-java-runtime/issues/930 com.squareup.retrofit2:* = 2.4.0