From ea4f4bd8099e3ce63eca2df6a196041ee64ccbff Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Tue, 12 Apr 2022 18:58:45 +0200 Subject: [PATCH] reduce usage of Guava Signed-off-by: Maxim Nesen --- connectors/apache-connector/pom.xml | 7 +-- connectors/apache5-connector/pom.xml | 5 --- connectors/jetty-connector/pom.xml | 7 +-- connectors/netty-connector/pom.xml | 7 +-- containers/jdk-http/pom.xml | 10 ++++- .../jersey/jdkhttp/JdkHttpsServerTest.java | 13 +++--- .../agent/ListenableFutureAgentResource.java | 45 +++++++++---------- ext/rx/rx-client-guava/pom.xml | 3 +- pom.xml | 9 +--- .../container-runner-maven-plugin/pom.xml | 8 ++-- .../maven/custom-enforcer-rules/pom.xml | 9 ++-- .../rule/PatternNotMatchedInFileRule.java | 30 +++---------- test-framework/memleak-test-common/pom.xml | 7 +-- .../test/memleak/common/MemoryLeakUtils.java | 26 +++-------- tests/e2e-client/pom.xml | 6 +-- tests/e2e-entity/pom.xml | 6 +-- tests/e2e-server/pom.xml | 6 +-- tests/e2e/pom.xml | 6 +-- tests/integration/jersey-2612/pom.xml | 7 +-- .../OptionalParamConverterProvider.java | 11 ++--- .../integration/jersey2612/Resource.java | 17 +++---- tests/integration/jersey-4321/pom.xml | 7 +-- tests/integration/property-check/pom.xml | 3 +- .../redeployment-leaking-test-app/pom.xml | 7 +-- .../DaemonThreadMemoryLeakingResource.java | 5 ++- .../test-cases/leaking-test-app/pom.xml | 7 +-- .../testleak/MemoryLeakingResource.java | 5 +-- .../jersey-release-notes-maven-plugin/pom.xml | 4 +- 28 files changed, 123 insertions(+), 160 deletions(-) diff --git a/connectors/apache-connector/pom.xml b/connectors/apache-connector/pom.xml index dd13cbc7a1..be8333f40c 100644 --- a/connectors/apache-connector/pom.xml +++ b/connectors/apache-connector/pom.xml @@ -1,7 +1,7 @@ diff --git a/connectors/apache5-connector/pom.xml b/connectors/apache5-connector/pom.xml index 669ac11e79..f790ec1741 100644 --- a/connectors/apache5-connector/pom.xml +++ b/connectors/apache5-connector/pom.xml @@ -55,11 +55,6 @@ ${project.version} test - - com.google.guava - guava - test - diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml index 4619c0c220..f8700b45c6 100644 --- a/connectors/jetty-connector/pom.xml +++ b/connectors/jetty-connector/pom.xml @@ -1,7 +1,7 @@ diff --git a/connectors/netty-connector/pom.xml b/connectors/netty-connector/pom.xml index 877d3774d2..3ffce37414 100644 --- a/connectors/netty-connector/pom.xml +++ b/connectors/netty-connector/pom.xml @@ -1,7 +1,7 @@ diff --git a/containers/jdk-http/pom.xml b/containers/jdk-http/pom.xml index 111748a423..70a05bc9ae 100644 --- a/containers/jdk-http/pom.xml +++ b/containers/jdk-http/pom.xml @@ -1,7 +1,7 @@ + + commons-io + commons-io + ${commons.io.version} diff --git a/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java b/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java index 042a383d83..74ef0ef105 100644 --- a/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java +++ b/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -30,6 +30,7 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.SSLHandshakeException; +import org.apache.commons.io.IOUtils; import org.glassfish.jersey.SslConfigurator; import org.glassfish.jersey.internal.util.JdkVersion; import org.glassfish.jersey.server.ResourceConfig; @@ -37,7 +38,7 @@ import org.junit.After; import org.junit.Test; -import com.google.common.io.ByteStreams; +//import com.google.common.io.ByteStreams; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; @@ -188,9 +189,9 @@ private SSLContext getClientSslContext() throws IOException { final SslConfigurator sslConfigClient = SslConfigurator.newInstance() - .trustStoreBytes(ByteStreams.toByteArray(trustStore)) + .trustStoreBytes(IOUtils.toByteArray(trustStore)) .trustStorePassword(TRUSTSTORE_CLIENT_PWD) - .keyStoreBytes(ByteStreams.toByteArray(keyStore)) + .keyStoreBytes(IOUtils.toByteArray(keyStore)) .keyPassword(KEYSTORE_CLIENT_PWD); return sslConfigClient.createSSLContext(); @@ -201,9 +202,9 @@ private SSLContext getServerSslContext() throws IOException { final InputStream keyStore = JdkHttpsServerTest.class.getResourceAsStream(KEYSTORE_SERVER_FILE); final SslConfigurator sslConfigServer = SslConfigurator.newInstance() - .keyStoreBytes(ByteStreams.toByteArray(keyStore)) + .keyStoreBytes(IOUtils.toByteArray(keyStore)) .keyPassword(KEYSTORE_SERVER_PWD) - .trustStoreBytes(ByteStreams.toByteArray(trustStore)) + .trustStoreBytes(IOUtils.toByteArray(trustStore)) .trustStorePassword(TRUSTSTORE_SERVER_PWD); return sslConfigServer.createSSLContext(); diff --git a/examples/rx-client-webapp/src/main/java/org/glassfish/jersey/examples/rx/agent/ListenableFutureAgentResource.java b/examples/rx-client-webapp/src/main/java/org/glassfish/jersey/examples/rx/agent/ListenableFutureAgentResource.java index 5cfbc4516d..91b2681f31 100644 --- a/examples/rx-client-webapp/src/main/java/org/glassfish/jersey/examples/rx/agent/ListenableFutureAgentResource.java +++ b/examples/rx-client-webapp/src/main/java/org/glassfish/jersey/examples/rx/agent/ListenableFutureAgentResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -12,6 +12,7 @@ import java.util.Arrays; import java.util.List; +import java.util.concurrent.Executors; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -32,7 +33,6 @@ import org.glassfish.jersey.server.Uri; import com.google.common.collect.Lists; -import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -80,7 +80,7 @@ public void onSuccess(final List result) { public void onFailure(final Throwable t) { async.resume(t); } - }); + }, Executors.newSingleThreadExecutor()); } private ListenableFuture visited(final AgentResponse response) { @@ -97,11 +97,11 @@ private ListenableFuture visited(final AgentResponse response) { }); // ... and set them to the final response. - return Futures.transform(visited, (AsyncFunction, AgentResponse>) destinations -> { + return Futures.transform(visited, destinations -> { response.setVisited(destinations); - return Futures.immediateFuture(response); - }); + return response; + }, Executors.newSingleThreadExecutor()); } private ListenableFuture recommended(final AgentResponse response) { @@ -120,15 +120,14 @@ private ListenableFuture recommended(final AgentResponse response // ... transform them to Recommendation instances ... final ListenableFuture> recommendations = Futures.transform( - destinations, - (AsyncFunction, List>) destinationList -> { + destinations, destinationList -> { // Create new array list to avoid multiple remote calls. final List recommendationList = Lists.newArrayList(Lists.transform( destinationList, destination -> new Recommendation(destination.getDestination(), null, 0))); - return Futures.immediateFuture(recommendationList); - }); + return recommendationList; + }, Executors.newSingleThreadExecutor()); // ... add forecasts and calculations ... final ListenableFuture>> filledRecommendations = Futures @@ -140,47 +139,47 @@ private ListenableFuture recommended(final AgentResponse response // ... and transform the list into agent response with filled recommendations. return Futures - .transform(filledRecommendations, (AsyncFunction>, AgentResponse>) input -> { + .transform(filledRecommendations, input -> { response.setRecommended(input.get(0)); - return Futures.immediateFuture(response); - }); + return response; + }, Executors.newSingleThreadExecutor()); } private ListenableFuture> forecasts(final ListenableFuture> recommendations) { forecast.register(RxListenableFutureInvokerProvider.class); // Fill the list with weather forecast. - return Futures.transform(recommendations, (AsyncFunction, List>) list -> + return Futures.transform(recommendations, list -> // For each recommendation ... - Futures.successfulAsList(Lists.transform(list, recommendation -> Futures.transform( + (List) Futures.successfulAsList(Lists.transform(list, recommendation -> Futures.transform( // ... get the weather forecast ... forecast.resolveTemplate("destination", recommendation.getDestination()).request() .rx(RxListenableFutureInvoker.class) .get(Forecast.class), // ... and set it to the recommendation. - (AsyncFunction) forecast -> { + forecast -> { recommendation.setForecast(forecast.getForecast()); - return Futures.immediateFuture(recommendation); - })))); + return recommendation; + }, Executors.newSingleThreadExecutor()))), Executors.newSingleThreadExecutor()); } private ListenableFuture> calculations(final ListenableFuture> recommendations) { calculation.register(RxListenableFutureInvokerProvider.class); // Fill the list with price calculations. - return Futures.transform(recommendations, (AsyncFunction, List>) list -> + return Futures.transform(recommendations, list -> // For each recommendation ... - Futures.successfulAsList(Lists.transform(list, recommendation -> Futures.transform( + (List) Futures.successfulAsList(Lists.transform(list, recommendation -> Futures.transform( // ... get the price calculation ... calculation.resolveTemplate("from", "Moon") .resolveTemplate("to", recommendation.getDestination()) .request().rx(RxListenableFutureInvoker.class).get(Calculation.class), // ... and set it to the recommendation. - (AsyncFunction) calculation -> { + calculation -> { recommendation.setPrice(calculation.getPrice()); - return Futures.immediateFuture(recommendation); - }))) + return recommendation; + }, Executors.newSingleThreadExecutor()))), Executors.newSingleThreadExecutor() ); } } diff --git a/ext/rx/rx-client-guava/pom.xml b/ext/rx/rx-client-guava/pom.xml index 48035da348..bbd3f345b6 100644 --- a/ext/rx/rx-client-guava/pom.xml +++ b/ext/rx/rx-client-guava/pom.xml @@ -1,7 +1,7 @@ diff --git a/test-framework/maven/custom-enforcer-rules/pom.xml b/test-framework/maven/custom-enforcer-rules/pom.xml index 1c3294ad35..256b84f9d6 100644 --- a/test-framework/maven/custom-enforcer-rules/pom.xml +++ b/test-framework/maven/custom-enforcer-rules/pom.xml @@ -1,7 +1,7 @@ junit diff --git a/test-framework/maven/custom-enforcer-rules/src/main/java/org/glassfish/jersey/test/maven/rule/PatternNotMatchedInFileRule.java b/test-framework/maven/custom-enforcer-rules/src/main/java/org/glassfish/jersey/test/maven/rule/PatternNotMatchedInFileRule.java index 8872e15243..4df500b841 100644 --- a/test-framework/maven/custom-enforcer-rules/src/main/java/org/glassfish/jersey/test/maven/rule/PatternNotMatchedInFileRule.java +++ b/test-framework/maven/custom-enforcer-rules/src/main/java/org/glassfish/jersey/test/maven/rule/PatternNotMatchedInFileRule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -19,18 +19,17 @@ import java.io.File; import java.io.IOException; import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.Arrays; -import java.util.LinkedList; import java.util.List; import java.util.regex.Pattern; +import java.util.stream.Collectors; import org.apache.maven.enforcer.rule.api.EnforcerRuleException; import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper; import org.apache.maven.plugins.enforcer.AbstractNonCacheableEnforcerRule; -import com.google.common.io.Files; -import com.google.common.io.LineProcessor; - /** * Maven enforcer rule to enforce that given file does not contain line matching given pattern. When matched, exception is * raised. @@ -67,25 +66,8 @@ public void execute(EnforcerRuleHelper helper) final Pattern patternCompiled = Pattern.compile(pattern); try { - final List lines = Files.readLines(file, Charset.defaultCharset(), new LineProcessor>() { - private List matchedLines = new LinkedList<>(); - - @Override - public boolean processLine(final String line) throws IOException { - if (patternCompiled.matcher(line).matches()) { - matchedLines.add(line); - if (maxMatchedLines != 0 && maxMatchedLines <= matchedLines.size()) { - return false; - } - } - return true; - } - - @Override - public List getResult() { - return matchedLines; - } - }); + final List lines = Files.lines(file.toPath(), Charset.defaultCharset()) + .filter(line -> patternCompiled.matcher(line).matches()).collect(Collectors.toList()); if (lines.size() > 0) { throw new EnforcerRuleException( diff --git a/test-framework/memleak-test-common/pom.xml b/test-framework/memleak-test-common/pom.xml index c08d1293cb..2e0ca94d0f 100644 --- a/test-framework/memleak-test-common/pom.xml +++ b/test-framework/memleak-test-common/pom.xml @@ -1,7 +1,7 @@ diff --git a/test-framework/memleak-test-common/src/main/java/org/glassfish/jersey/test/memleak/common/MemoryLeakUtils.java b/test-framework/memleak-test-common/src/main/java/org/glassfish/jersey/test/memleak/common/MemoryLeakUtils.java index e19b2c9ccf..d519d3fb4e 100644 --- a/test-framework/memleak-test-common/src/main/java/org/glassfish/jersey/test/memleak/common/MemoryLeakUtils.java +++ b/test-framework/memleak-test-common/src/main/java/org/glassfish/jersey/test/memleak/common/MemoryLeakUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -22,17 +22,15 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.charset.Charset; +import java.nio.file.Files; import java.nio.file.Paths; import java.util.Arrays; -import java.util.LinkedList; import java.util.List; import java.util.regex.Pattern; +import java.util.stream.Collectors; import javax.management.MBeanServer; -import com.google.common.io.Files; -import com.google.common.io.LineProcessor; - /** * Utility class for memory leak test infrastructure. * @@ -87,22 +85,8 @@ public static void verifyNoOutOfMemoryOccurred() throws IOException { return; } - final List lines = Files.readLines(logFile, Charset.defaultCharset(), new LineProcessor>() { - private List matchedLines = new LinkedList<>(); - - @Override - public boolean processLine(final String line) throws IOException { - if (PATTERN.matcher(line).matches()) { - matchedLines.add(line); - } - return true; - } - - @Override - public List getResult() { - return matchedLines; - } - }); + final List lines = Files.lines(logFile.toPath(), Charset.defaultCharset()) + .filter(line -> PATTERN.matcher(line).matches()).collect(Collectors.toList()); if (lines.size() > 0) { throw new IllegalStateException( diff --git a/tests/e2e-client/pom.xml b/tests/e2e-client/pom.xml index a9b0a41697..69ed38a3df 100644 --- a/tests/e2e-client/pom.xml +++ b/tests/e2e-client/pom.xml @@ -1,7 +1,7 @@ org.glassfish.jersey.test-framework diff --git a/tests/e2e-entity/pom.xml b/tests/e2e-entity/pom.xml index 09ce27447a..756d603c11 100644 --- a/tests/e2e-entity/pom.xml +++ b/tests/e2e-entity/pom.xml @@ -1,7 +1,7 @@ org.glassfish.jersey.test-framework diff --git a/tests/e2e-server/pom.xml b/tests/e2e-server/pom.xml index df25460b5f..77568e35e3 100644 --- a/tests/e2e-server/pom.xml +++ b/tests/e2e-server/pom.xml @@ -1,7 +1,7 @@ org.glassfish.jersey.test-framework diff --git a/tests/e2e/pom.xml b/tests/e2e/pom.xml index 0c31034677..ec337b08ee 100644 --- a/tests/e2e/pom.xml +++ b/tests/e2e/pom.xml @@ -1,7 +1,7 @@ org.glassfish.jersey.test-framework diff --git a/tests/integration/jersey-2612/pom.xml b/tests/integration/jersey-2612/pom.xml index 6f13ea589e..b12cb1ee41 100644 --- a/tests/integration/jersey-2612/pom.xml +++ b/tests/integration/jersey-2612/pom.xml @@ -1,7 +1,7 @@ org.glassfish.jersey.test-framework.providers diff --git a/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/OptionalParamConverterProvider.java b/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/OptionalParamConverterProvider.java index 25b6edf03d..92849cf1cc 100644 --- a/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/OptionalParamConverterProvider.java +++ b/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/OptionalParamConverterProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -19,6 +19,7 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.List; +import java.util.Optional; import java.util.Set; import javax.ws.rs.ext.ParamConverter; @@ -32,9 +33,6 @@ import org.glassfish.jersey.internal.util.ReflectionHelper; import org.glassfish.jersey.internal.util.collection.ClassTypePair; -import com.google.common.base.Function; -import com.google.common.base.Optional; - @Singleton public class OptionalParamConverterProvider implements ParamConverterProvider { @@ -53,7 +51,7 @@ public ParamConverter getConverter(final Class rawType, final Type gen return new ParamConverter() { @Override public T fromString(final String value) { - return rawType.cast(Optional.fromNullable(value)); + return rawType.cast(Optional.ofNullable(value)); } @Override @@ -71,8 +69,7 @@ public String toString(final T value) throws IllegalArgumentException { return new ParamConverter() { @Override public T fromString(final String value) { - return rawType.cast(Optional.fromNullable(value) - .transform((Function) s -> converter.fromString(value))); + return rawType.cast(Optional.ofNullable(value).map(o -> converter.fromString(value))); } @Override diff --git a/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/Resource.java b/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/Resource.java index ad1be27fd9..bc8cd891c7 100644 --- a/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/Resource.java +++ b/tests/integration/jersey-2612/src/main/java/org/glassfish/jersey/tests/integration/jersey2612/Resource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -20,9 +20,8 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; - -import com.google.common.base.Function; -import com.google.common.base.Optional; +import java.util.Optional; +import java.util.function.Function; /** * Test resource. @@ -34,19 +33,15 @@ public class Resource { @GET @Produces("text/plain") public String hello(@QueryParam("name") final Optional name) { - return "Hello " + name.or("World") + "!"; + return "Hello " + name.orElse("World") + "!"; } @Path("square") @GET @Produces("text/plain") public int echo(@QueryParam("value") final Optional value) { - return value.transform(new Function() { - @Override - public Integer apply(final Integer integer) { - return integer * integer; - } - }).or(0); + + return value.map(integer -> integer * integer).orElse(0); } } diff --git a/tests/integration/jersey-4321/pom.xml b/tests/integration/jersey-4321/pom.xml index 77df827d59..7332c16702 100644 --- a/tests/integration/jersey-4321/pom.xml +++ b/tests/integration/jersey-4321/pom.xml @@ -1,7 +1,7 @@ org.glassfish.jersey.connectors jersey-apache-connector diff --git a/tests/integration/property-check/pom.xml b/tests/integration/property-check/pom.xml index 399c27c06b..9ac0bab3e4 100644 --- a/tests/integration/property-check/pom.xml +++ b/tests/integration/property-check/pom.xml @@ -1,7 +1,7 @@ diff --git a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/DaemonThreadMemoryLeakingResource.java b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/DaemonThreadMemoryLeakingResource.java index 369f581b0e..24dcd3a229 100644 --- a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/DaemonThreadMemoryLeakingResource.java +++ b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/DaemonThreadMemoryLeakingResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -16,6 +16,8 @@ package org.glassfish.jersey.tests.memleaks.testleak; +import org.glassfish.jersey.internal.guava.ThreadFactoryBuilder; + import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -28,7 +30,6 @@ import javax.inject.Singleton; -import com.google.common.util.concurrent.ThreadFactoryBuilder; /** * Resource that causes {@link OutOfMemoryError} exception upon repetitive call of {@link #invoke(int)} of an application that is diff --git a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml index 53da399209..878a9b3e4b 100644 --- a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml +++ b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml @@ -1,7 +1,7 @@ diff --git a/tests/mem-leaks/test-cases/leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/MemoryLeakingResource.java b/tests/mem-leaks/test-cases/leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/MemoryLeakingResource.java index f3cccf2508..eb61f0b7ff 100644 --- a/tests/mem-leaks/test-cases/leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/MemoryLeakingResource.java +++ b/tests/mem-leaks/test-cases/leaking-test-app/src/main/java/org/glassfish/jersey/tests/memleaks/testleak/MemoryLeakingResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -25,9 +25,6 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.client.WebTarget; import javax.inject.Singleton; diff --git a/tools/jersey-release-notes-maven-plugin/pom.xml b/tools/jersey-release-notes-maven-plugin/pom.xml index e7f2e0c3d0..a9c74ecdb0 100644 --- a/tools/jersey-release-notes-maven-plugin/pom.xml +++ b/tools/jersey-release-notes-maven-plugin/pom.xml @@ -1,7 +1,7 @@