From 5343591fbe58580620be1873758bab7c6e49b8c3 Mon Sep 17 00:00:00 2001 From: Tomas Langer Date: Thu, 5 Oct 2023 15:20:51 +0200 Subject: [PATCH] Remove older deprecated methods and types. --- .../hocon/HoconConfigParserBuilder.java | 14 +--- .../health/MicrostreamHealthCheck.java | 2 +- .../connectors/jms/shim/JakartaSession.java | 16 +---- .../messaging/FormerHealthProbe.java | 69 ------------------- .../messaging/MessagingCdiExtension.java | 27 +------- .../providers/oidc/common/OidcConfig.java | 38 ---------- 6 files changed, 4 insertions(+), 162 deletions(-) delete mode 100644 microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/FormerHealthProbe.java diff --git a/config/hocon/src/main/java/io/helidon/config/hocon/HoconConfigParserBuilder.java b/config/hocon/src/main/java/io/helidon/config/hocon/HoconConfigParserBuilder.java index 21d26954f52..7bb5bd9980c 100644 --- a/config/hocon/src/main/java/io/helidon/config/hocon/HoconConfigParserBuilder.java +++ b/config/hocon/src/main/java/io/helidon/config/hocon/HoconConfigParserBuilder.java @@ -30,7 +30,7 @@ *

* {@link Config#resolve() HOCON resolving substitutions support} is by default enabled. * {@link ConfigResolveOptions#defaults()} is used to resolve loaded configuration. - * It is possible to {@link #disableResolving() disable resolving} feature + * It is possible to {@link #resolvingEnabled(boolean)}} to disable this feature * or specify custom {@link #resolveOptions(ConfigResolveOptions) ConfigResolveOptions} instance. */ public final class HoconConfigParserBuilder implements Builder { @@ -46,18 +46,6 @@ public final class HoconConfigParserBuilder implements Builder diff --git a/integrations/microstream/health/src/main/java/io/helidon/integrations/microstream/health/MicrostreamHealthCheck.java b/integrations/microstream/health/src/main/java/io/helidon/integrations/microstream/health/MicrostreamHealthCheck.java index 93cb8ae90e4..079199ea004 100644 --- a/integrations/microstream/health/src/main/java/io/helidon/integrations/microstream/health/MicrostreamHealthCheck.java +++ b/integrations/microstream/health/src/main/java/io/helidon/integrations/microstream/health/MicrostreamHealthCheck.java @@ -139,7 +139,7 @@ public Builder name(String name) { * @return updated builder instance * @deprecated use {@link #timeout(Duration)} instead */ - @Deprecated(since = "4.0.0") + @Deprecated(since = "4.0.0", forRemoval = true) public Builder timeout(long duration, TimeUnit timeUnit) { this.timeoutDuration = duration; this.timeoutUnit = timeUnit; diff --git a/messaging/connectors/jms-shim/src/main/java/io/helidon/messaging/connectors/jms/shim/JakartaSession.java b/messaging/connectors/jms-shim/src/main/java/io/helidon/messaging/connectors/jms/shim/JakartaSession.java index 55697e3aeab..1f7216bf8f7 100644 --- a/messaging/connectors/jms-shim/src/main/java/io/helidon/messaging/connectors/jms/shim/JakartaSession.java +++ b/messaging/connectors/jms-shim/src/main/java/io/helidon/messaging/connectors/jms/shim/JakartaSession.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022 Oracle and/or its affiliates. + * Copyright (c) 2021, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -249,20 +249,6 @@ public void unsubscribe(String name) throws JMSException { ShimUtil.run(() -> delegate.unsubscribe(name)); } - /** - * Unwrap the underlying instance of javax session. - * - * @param type class to unwrap to - * @param type to unwrap to - * @return unwrapped session - * @deprecated since 3.0.3, use {@link io.helidon.messaging.connectors.jms.shim.JakartaSession#unwrap()} instead. - * @throws java.lang.ClassCastException in case the underlying instance is not compatible with the requested type - */ - @Deprecated(forRemoval = true, since = "3.0.3") - public S unwrap(Class type) { - return type.cast(delegate); - } - @Override public T unwrap() { return delegate; diff --git a/microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/FormerHealthProbe.java b/microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/FormerHealthProbe.java deleted file mode 100644 index b7d0da8dc09..00000000000 --- a/microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/FormerHealthProbe.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2022 Oracle and/or its affiliates. - * - * 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 io.helidon.microprofile.messaging; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.microprofile.reactive.messaging.Message; -import org.reactivestreams.Subscriber; -import org.reactivestreams.Subscription; - -/** - * Old style messaging health probe for backward compatibility. - * - * @deprecated Use {@link MessagingChannelProcessor} instead. - */ -@Deprecated(since = "3.0.0", forRemoval = true) -class FormerHealthProbe implements MessagingChannelProcessor { - - private final Map liveChannels = new HashMap<>(); - private final Map readyChannels = new HashMap<>(); - - @Override - public void onInit(String channelName) { - liveChannels.put(channelName, true); - readyChannels.put(channelName, false); - } - - @Override - public void onSubscribe(String channelName, Subscriber> subscriber, Subscription subscription) { - readyChannels.put(channelName, true); - } - - @Override - public void onError(String channelName, Throwable t) { - liveChannels.put(channelName, false); - } - - @Override - public void onCancel(String channelName) { - liveChannels.put(channelName, false); - } - - @Override - public void onComplete(String channelName) { - liveChannels.put(channelName, false); - } - - Map getLiveChannels() { - return liveChannels; - } - - Map getReadyChannels() { - return readyChannels; - } -} diff --git a/microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/MessagingCdiExtension.java b/microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/MessagingCdiExtension.java index 9274386a9c5..51f574c4295 100644 --- a/microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/MessagingCdiExtension.java +++ b/microprofile/messaging/core/src/main/java/io/helidon/microprofile/messaging/MessagingCdiExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2022 Oracle and/or its affiliates. + * Copyright (c) 2020, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ import java.lang.reflect.Type; import java.util.HashSet; -import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; @@ -61,35 +60,11 @@ public class MessagingCdiExtension implements Extension { private final ChannelRouter channelRouter = new ChannelRouter(); private final Set> aotBeanRegistrations = new HashSet<>(); - private final FormerHealthProbe formerHealthProbe = new FormerHealthProbe(); /** * Initialize messaging CDI extension. */ public MessagingCdiExtension() { - channelRouter.getChannelProcessors().register(formerHealthProbe); - } - - /** - * Get names of all channels accompanied by boolean if cancel or onError signal has been intercepted in it. - * - * @return map of channels - * @deprecated Implement {@link MessagingChannelProcessor} as a bean instead, which can peak to any messaging channel. - */ - @Deprecated(since = "3.0.0", forRemoval = true) - public Map channelsLiveness() { - return formerHealthProbe.getLiveChannels(); - } - - /** - * Get names of all channels accompanied by boolean if onSubscribe signal has been intercepted in it. - * - * @return map of channels - * @deprecated Implement {@link MessagingChannelProcessor} as a bean instead, which can peak to any messaging channel. - */ - @Deprecated(since = "3.0.0", forRemoval = true) - public Map channelsReadiness() { - return formerHealthProbe.getReadyChannels(); } private void registerChannelMethods( diff --git a/security/providers/oidc-common/src/main/java/io/helidon/security/providers/oidc/common/OidcConfig.java b/security/providers/oidc-common/src/main/java/io/helidon/security/providers/oidc/common/OidcConfig.java index 5bc9e839a9f..4106965e525 100644 --- a/security/providers/oidc-common/src/main/java/io/helidon/security/providers/oidc/common/OidcConfig.java +++ b/security/providers/oidc-common/src/main/java/io/helidon/security/providers/oidc/common/OidcConfig.java @@ -637,44 +637,6 @@ public Duration tokenRefreshSkew() { return tokenRefreshSkew; } - /** - * Cookie name. - * - * @return name of the cookie to use - * @see OidcConfig.Builder#cookieName(String) - * @deprecated use {@link #tokenCookieHandler()} instead - */ - @Deprecated(forRemoval = true, since = "2.4.0") - public String cookieName() { - return tokenCookieHandler().cookieName(); - } - - /** - * Additional options of the cookie to use. - * - * @return cookie options to use in cookie string - * @see OidcConfig.Builder#cookieHttpOnly(Boolean) - * @see OidcConfig.Builder#cookieDomain(String) - * @deprecated please use {@link #tokenCookieHandler()} instead - */ - @Deprecated(forRemoval = true, since = "2.4.0") - public String cookieOptions() { - return tokenCookieHandler().createCookieOptions(); - } - - /** - * Prefix of a cookie header formed by name and "=". - * - * @return prefix of cookie value - * @see OidcConfig.Builder#cookieName(String) - * @deprecated use {@link io.helidon.security.providers.oidc.common.OidcCookieHandler} instead, this method - * will no longer be avilable - */ - @Deprecated(forRemoval = true, since = "2.4.0") - public String cookieValuePrefix() { - return tokenCookieHandler().cookieValuePrefix(); - } - /** * Determines whether to force the use of relative URIs in all requests, * regardless of the presence or absence of proxies or no-proxy lists.