From 4b8a307f8c885354e8889b57aeac877324d853e2 Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Mon, 5 Jan 2026 20:22:31 +0000 Subject: [PATCH] Excavator: Remove calls to deprecated APIs --- .../conjure/java/client/config/ClientConfigurations.java | 2 -- .../conjure/java/client/config/ClientConfigurationsTest.java | 3 --- .../conjure/java/serialization/InstrumentedJsonFactory.java | 5 ----- .../palantir/conjure/java/serialization/ObjectMappers.java | 2 -- .../conjure/java/serialization/ObjectMappersTest.java | 5 ----- .../java/client/jaxrs/AbstractFeignJaxRsClientBuilder.java | 1 - .../com/palantir/conjure/java/server/jersey/TracerTest.java | 1 - .../ext/refresh/RefreshableProxyInvocationHandlerTest.java | 1 - .../conjure/java/okhttp/ConcurrencyLimitingInterceptor.java | 1 - .../com/palantir/conjure/java/okhttp/RemotingOkHttpCall.java | 1 - .../java/okhttp/ConcurrencyLimitingInterceptorTest.java | 3 --- .../conjure/java/okhttp/MeshProxyInterceptorTest.java | 1 - .../com/palantir/conjure/java/okhttp/OkHttpClientsTest.java | 1 - .../java/okhttp/RemoteExceptionResponseHandlerTest.java | 1 - .../okhttp/UnknownRemoteExceptionResponseHandlerTest.java | 1 - .../java/com/palantir/undertest/UndertowServerExtension.java | 1 - 16 files changed, 30 deletions(-) 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 345e07cef..655141557 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 @@ -85,7 +85,6 @@ public static ClientConfiguration of(ServiceConfiguration config) { * {@link TrustContextFactory}, filling in empty/absent configuration with the defaults specified as constants * in this class. */ - @SuppressWarnings("for-rollout:deprecation") public static ClientConfiguration of(ServiceConfiguration config, TrustContextFactory factory) { TrustContext trustContext = factory.create(config.security()); return ClientConfiguration.builder() @@ -133,7 +132,6 @@ public static ClientConfiguration of( return of(uris, sslSocketFactory, trustManager, Optional.of(userAgent)); } - @SuppressWarnings("for-rollout:deprecation") private static ClientConfiguration of( List uris, SSLSocketFactory sslSocketFactory, diff --git a/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java b/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java index 71d7ad23d..2a4a936a2 100644 --- a/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java +++ b/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java @@ -43,7 +43,6 @@ public final class ClientConfigurationsTest { private static final ImmutableList uris = ImmutableList.of("uri"); - @SuppressWarnings("for-rollout:deprecation") @Test public void testFromServiceConfig_fillsInDefaults() { ServiceConfiguration serviceConfig = ServiceConfiguration.builder() @@ -112,7 +111,6 @@ public void meshProxy_exactlyOneUri() throws Exception { .hasMessage("If meshProxy is configured then uris must contain exactly 1 URI"); } - @SuppressWarnings("for-rollout:deprecation") @Test public void overriding_tagged_metric_registry_is_convenient() { ServiceConfiguration serviceConfig = ServiceConfiguration.builder() @@ -152,7 +150,6 @@ public void systemEnvUri() { .isNull(); } - @SuppressWarnings("for-rollout:deprecation") @Test public void testProxyAddressIsNotResolved() { ProxySelector selector = ClientConfigurations.createProxySelector(ProxyConfiguration.of("localhost:80")); diff --git a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/InstrumentedJsonFactory.java b/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/InstrumentedJsonFactory.java index 0dccf14fa..17ddc2299 100644 --- a/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/InstrumentedJsonFactory.java +++ b/conjure-java-jackson-serialization/src/main/java/com/palantir/conjure/java/serialization/InstrumentedJsonFactory.java @@ -236,13 +236,11 @@ public JsonLocation currentTokenLocation() { return delegate.currentTokenLocation(); } - @SuppressWarnings("for-rollout:deprecation") @Override public JsonLocation getCurrentLocation() { return delegate.getCurrentLocation(); } - @SuppressWarnings("for-rollout:deprecation") @Override public JsonLocation getTokenLocation() { return delegate.getTokenLocation(); @@ -258,13 +256,11 @@ public void assignCurrentValue(Object value) { delegate.assignCurrentValue(value); } - @SuppressWarnings("for-rollout:deprecation") @Override public Object getCurrentValue() { return delegate.getCurrentValue(); } - @SuppressWarnings("for-rollout:deprecation") @Override public void setCurrentValue(Object value) { delegate.setCurrentValue(value); @@ -459,7 +455,6 @@ public void overrideCurrentName(String name) { delegate.overrideCurrentName(name); } - @SuppressWarnings("for-rollout:deprecation") @Override public String getCurrentName() throws IOException { return delegate.getCurrentName(); 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 f1a906654..7dd441e3c 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 @@ -170,7 +170,6 @@ public static ObjectMapper newSmileServerObjectMapper() { *
  • Deserializing a null for a primitive field will throw an exception. * */ - @SuppressWarnings("for-rollout:deprecation") public static > B withDefaultModules(B builder) { return builder.typeFactory(NonCachingTypeFactory.from(builder.build().getTypeFactory())) .addModule(new GuavaModule()) @@ -206,7 +205,6 @@ public static > B withDefa *
  • Deserializing a null for a primitive field will throw an exception. * */ - @SuppressWarnings("for-rollout:deprecation") public static ObjectMapper withDefaultModules(ObjectMapper mapper) { return mapper.setTypeFactory(NonCachingTypeFactory.from(mapper.getTypeFactory())) .registerModule(new GuavaModule()) diff --git a/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java b/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java index 813f0827f..059d35257 100644 --- a/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java +++ b/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java @@ -325,7 +325,6 @@ public void testOptionalIntOverflowDeserialization() { @Test public void testStringMetrics_json() throws IOException { - @SuppressWarnings("for-rollout:deprecation") TaggedMetricRegistry registry = SharedTaggedMetricRegistries.getSingleton(); removeJsonParserMetrics(registry); Histogram stringLength = JsonParserMetrics.of(registry).stringLength(JsonFactory.FORMAT_NAME_JSON); @@ -340,7 +339,6 @@ public void testStringMetrics_json() throws IOException { @Test public void testStringMetricsNotRecordedWhenValuesAreSmall_json() throws IOException { - @SuppressWarnings("for-rollout:deprecation") TaggedMetricRegistry registry = SharedTaggedMetricRegistries.getSingleton(); removeJsonParserMetrics(registry); Histogram stringLength = JsonParserMetrics.of(registry).stringLength(JsonFactory.FORMAT_NAME_JSON); @@ -353,7 +351,6 @@ public void testStringMetricsNotRecordedWhenValuesAreSmall_json() throws IOExcep @Test public void testStringMetrics_smile() throws IOException { - @SuppressWarnings("for-rollout:deprecation") TaggedMetricRegistry registry = SharedTaggedMetricRegistries.getSingleton(); removeJsonParserMetrics(registry); Histogram stringLength = JsonParserMetrics.of(registry).stringLength(SmileFactory.FORMAT_NAME_SMILE); @@ -369,7 +366,6 @@ public void testStringMetrics_smile() throws IOException { @Test public void testStringMetricsNotRecordedWhenValuesAreSmall_smile() throws IOException { - @SuppressWarnings("for-rollout:deprecation") TaggedMetricRegistry registry = SharedTaggedMetricRegistries.getSingleton(); removeJsonParserMetrics(registry); Histogram stringLength = JsonParserMetrics.of(registry).stringLength(SmileFactory.FORMAT_NAME_SMILE); @@ -443,7 +439,6 @@ public void testObjectMapperWithDefaultModules() throws IOException { @Test public void testJsonMapperBuilderWithDefaultModules() throws IOException { - @SuppressWarnings("for-rollout:deprecation") ObjectMapper mapper = ObjectMappers.withDefaultModules( JsonMapper.builder().addModule(new Jdk8Module().configureAbsentsAsNulls(true))) .build(); diff --git a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/AbstractFeignJaxRsClientBuilder.java b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/AbstractFeignJaxRsClientBuilder.java index f757faa83..604a2c97a 100644 --- a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/AbstractFeignJaxRsClientBuilder.java +++ b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/AbstractFeignJaxRsClientBuilder.java @@ -92,7 +92,6 @@ final T build(Class serviceClass, UserAgent userAgent) { String name = "JaxRsClient-" + serviceClass.getSimpleName(); ApacheHttpClientChannels.CloseableClient client = ApacheHttpClientChannels.createCloseableHttpClient(hydratedConfiguration, name); - @SuppressWarnings("for-rollout:deprecation") Channel channel = DialogueChannel.builder() .channelName(name) .channelFactory(uri -> ApacheHttpClientChannels.createSingleUri(uri, client)) diff --git a/conjure-java-jersey-jakarta-server/src/test/java/com/palantir/conjure/java/server/jersey/TracerTest.java b/conjure-java-jersey-jakarta-server/src/test/java/com/palantir/conjure/java/server/jersey/TracerTest.java index 94810f0b9..d4ce48488 100644 --- a/conjure-java-jersey-jakarta-server/src/test/java/com/palantir/conjure/java/server/jersey/TracerTest.java +++ b/conjure-java-jersey-jakarta-server/src/test/java/com/palantir/conjure/java/server/jersey/TracerTest.java @@ -39,7 +39,6 @@ public final class TracerTest { .jersey(ConjureJerseyFeature.INSTANCE) .jersey(new TracerTest.TracingTestResource()); - @SuppressWarnings("for-rollout:deprecation") @Test public void testTracingFilterIsApplied() { undertow.runRequest( diff --git a/extras/refresh-utils/src/test/java/com/palantir/conjure/java/ext/refresh/RefreshableProxyInvocationHandlerTest.java b/extras/refresh-utils/src/test/java/com/palantir/conjure/java/ext/refresh/RefreshableProxyInvocationHandlerTest.java index 5e97610bb..5f0181d18 100644 --- a/extras/refresh-utils/src/test/java/com/palantir/conjure/java/ext/refresh/RefreshableProxyInvocationHandlerTest.java +++ b/extras/refresh-utils/src/test/java/com/palantir/conjure/java/ext/refresh/RefreshableProxyInvocationHandlerTest.java @@ -46,7 +46,6 @@ interface Callable { @Mock private Callable delegate2; - @SuppressWarnings("for-rollout:deprecation") @BeforeEach public void before() { MockitoAnnotations.initMocks(this); diff --git a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptor.java b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptor.java index a8d7d6670..4cf72635f 100644 --- a/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptor.java +++ b/okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptor.java @@ -96,7 +96,6 @@ private static Response wrapResponse(Limiter.Listener listener, Response respons return response; } ResponseBody currentBody = response.body(); - @SuppressWarnings("for-rollout:deprecation") ResponseBody newResponseBody = ResponseBody.create( currentBody.contentType(), currentBody.contentLength(), wrapSource(currentBody.source(), listener)); return response.newBuilder().body(newResponseBody).build(); 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 e0a91e477..023e274f3 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 @@ -187,7 +187,6 @@ private static Response buildFrom(Response unbufferedResponse, byte[] bodyBytes) .build(); } - @SuppressWarnings("for-rollout:deprecation") private static ResponseBody buffer(MediaType mediaType, byte[] bodyBytes) { return ResponseBody.create(mediaType, bodyBytes); } diff --git a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptorTest.java b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptorTest.java index f2a5425e1..abf7179f1 100644 --- a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptorTest.java +++ b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/ConcurrencyLimitingInterceptorTest.java @@ -118,7 +118,6 @@ public void ignoresIfIoException() throws IOException { @Test public void wrapsResponseBody() throws IOException { String data = "data"; - @SuppressWarnings("for-rollout:deprecation") ResponseBody body = ResponseBody.create(MediaType.parse("application/json"), data); when(chain.proceed(request)).thenReturn(response.newBuilder().body(body).build()); Response wrappedResponse = interceptor.intercept(chain); @@ -129,7 +128,6 @@ public void wrapsResponseBody() throws IOException { @Test public void proxyHandlesExceptions() throws IOException { - @SuppressWarnings("for-rollout:deprecation") ResponseBody body = ResponseBody.create(MediaType.parse("application/json"), -1, mockSource); when(chain.proceed(request)).thenReturn(response.newBuilder().body(body).build()); IOException exception = new IOException(); @@ -149,7 +147,6 @@ public void ignoresIfNoContent() throws IOException { @Test public void marksSuccessIfContentEmpty() throws IOException { - @SuppressWarnings("for-rollout:deprecation") Response empty = response.newBuilder() .code(204) .body(ResponseBody.create(MediaType.parse("application/json"), new byte[0])) diff --git a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/MeshProxyInterceptorTest.java b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/MeshProxyInterceptorTest.java index d2b18728e..a44474da3 100644 --- a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/MeshProxyInterceptorTest.java +++ b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/MeshProxyInterceptorTest.java @@ -42,7 +42,6 @@ public final class MeshProxyInterceptorTest { private MeshProxyInterceptor interceptor; - @SuppressWarnings("for-rollout:deprecation") @BeforeEach public void before() throws Exception { MockitoAnnotations.initMocks(this); 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 7e096b45b..a2477a320 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 @@ -233,7 +233,6 @@ public void verifyResponseMetricsAreRegistered() throws IOException { @Test /** See {@link DispatcherMetricSet}. */ public void verifyGlobalMetricsAreRegistered() { - @SuppressWarnings("for-rollout:deprecation") TaggedMetricRegistry registry = DefaultTaggedMetricRegistry.getDefault(); ClientConfiguration clientConfiguration = ClientConfiguration.builder() .from(createTestConfig(url)) diff --git a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/RemoteExceptionResponseHandlerTest.java b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/RemoteExceptionResponseHandlerTest.java index e5c4fd175..cc18ece01 100644 --- a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/RemoteExceptionResponseHandlerTest.java +++ b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/RemoteExceptionResponseHandlerTest.java @@ -201,7 +201,6 @@ private static Optional decode(String contentType, int status, return handler.handle(response(status, contentType, body)); } - @SuppressWarnings("for-rollout:deprecation") private static okhttp3.Response response(int code, String mediaType, @CheckForNull String body) { okhttp3.Response.Builder response = new okhttp3.Response.Builder() .request(request) diff --git a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/UnknownRemoteExceptionResponseHandlerTest.java b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/UnknownRemoteExceptionResponseHandlerTest.java index cf269f1b7..4d20711ca 100644 --- a/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/UnknownRemoteExceptionResponseHandlerTest.java +++ b/okhttp-clients/src/test/java/com/palantir/conjure/java/okhttp/UnknownRemoteExceptionResponseHandlerTest.java @@ -79,7 +79,6 @@ private static Optional decode(String contentType, int s return handler.handle(response(status, contentType, body)); } - @SuppressWarnings("for-rollout:deprecation") private static Response response(int code, String mediaType, @CheckForNull String body) { Response.Builder response = new Response.Builder() .request(request) diff --git a/undertow-jakarta-testing/src/main/java/com/palantir/undertest/UndertowServerExtension.java b/undertow-jakarta-testing/src/main/java/com/palantir/undertest/UndertowServerExtension.java index af1350921..8fc7db712 100644 --- a/undertow-jakarta-testing/src/main/java/com/palantir/undertest/UndertowServerExtension.java +++ b/undertow-jakarta-testing/src/main/java/com/palantir/undertest/UndertowServerExtension.java @@ -183,7 +183,6 @@ public void afterAll(ExtensionContext _context) throws IOException { } } - @SuppressWarnings("for-rollout:deprecation") @MustBeClosed @CheckReturnValue public CloseableHttpResponse makeRequest(ClassicHttpRequest request) throws IOException {