diff --git a/kork-cloud-config-server/src/main/java/com/netflix/spinnaker/kork/configserver/autoconfig/RemoteConfigSourceConfigured.java b/kork-cloud-config-server/src/main/java/com/netflix/spinnaker/kork/configserver/autoconfig/RemoteConfigSourceConfigured.java index 1238dc5cd..0d445f709 100644 --- a/kork-cloud-config-server/src/main/java/com/netflix/spinnaker/kork/configserver/autoconfig/RemoteConfigSourceConfigured.java +++ b/kork-cloud-config-server/src/main/java/com/netflix/spinnaker/kork/configserver/autoconfig/RemoteConfigSourceConfigured.java @@ -16,7 +16,7 @@ package com.netflix.spinnaker.kork.configserver.autoconfig; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Condition; diff --git a/kork-core/src/main/java/com/netflix/spinnaker/kork/metrics/SpectatorConfiguration.java b/kork-core/src/main/java/com/netflix/spinnaker/kork/metrics/SpectatorConfiguration.java index 73e8e342c..670d3e4f4 100644 --- a/kork-core/src/main/java/com/netflix/spinnaker/kork/metrics/SpectatorConfiguration.java +++ b/kork-core/src/main/java/com/netflix/spinnaker/kork/metrics/SpectatorConfiguration.java @@ -22,7 +22,7 @@ import com.netflix.spectator.jvm.Jmx; import com.netflix.spectator.micrometer.MicrometerRegistry; import io.micrometer.core.instrument.MeterRegistry; -import javax.annotation.PreDestroy; +import jakarta.annotation.PreDestroy; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; diff --git a/kork-credentials-api/kork-credentials-api.gradle b/kork-credentials-api/kork-credentials-api.gradle index 83478be42..8f40b9d3e 100644 --- a/kork-credentials-api/kork-credentials-api.gradle +++ b/kork-credentials-api/kork-credentials-api.gradle @@ -22,7 +22,7 @@ dependencies { api project(":kork-plugins-api") implementation project(":kork-annotations") implementation project(":kork-exceptions") - implementation 'javax.annotation:javax.annotation-api' + implementation 'jakarta.annotation:jakarta.annotation-api' testRuntimeOnly "cglib:cglib-nodep" testRuntimeOnly "org.objenesis:objenesis" diff --git a/kork-credentials-api/src/main/java/com/netflix/spinnaker/credentials/definition/AbstractCredentialsLoader.java b/kork-credentials-api/src/main/java/com/netflix/spinnaker/credentials/definition/AbstractCredentialsLoader.java index 7d3d87b23..b883179b1 100644 --- a/kork-credentials-api/src/main/java/com/netflix/spinnaker/credentials/definition/AbstractCredentialsLoader.java +++ b/kork-credentials-api/src/main/java/com/netflix/spinnaker/credentials/definition/AbstractCredentialsLoader.java @@ -18,7 +18,7 @@ import com.netflix.spinnaker.credentials.Credentials; import com.netflix.spinnaker.credentials.CredentialsRepository; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import lombok.Getter; public abstract class AbstractCredentialsLoader diff --git a/kork-credentials/kork-credentials.gradle b/kork-credentials/kork-credentials.gradle index 0e7a3458d..ca28f135a 100644 --- a/kork-credentials/kork-credentials.gradle +++ b/kork-credentials/kork-credentials.gradle @@ -24,7 +24,7 @@ dependencies { implementation 'org.apache.logging.log4j:log4j-api' implementation "org.springframework.boot:spring-boot" implementation 'org.springframework.boot:spring-boot-starter-json' - implementation 'javax.annotation:javax.annotation-api' + implementation 'jakarta.annotation:jakarta.annotation-api' implementation 'org.slf4j:slf4j-api' testRuntimeOnly "cglib:cglib-nodep" diff --git a/kork-eureka/src/main/java/com/netflix/spinnaker/kork/archaius/ArchaiusAutoConfiguration.java b/kork-eureka/src/main/java/com/netflix/spinnaker/kork/archaius/ArchaiusAutoConfiguration.java index 1a427a495..14e703daa 100644 --- a/kork-eureka/src/main/java/com/netflix/spinnaker/kork/archaius/ArchaiusAutoConfiguration.java +++ b/kork-eureka/src/main/java/com/netflix/spinnaker/kork/archaius/ArchaiusAutoConfiguration.java @@ -22,9 +22,9 @@ import com.netflix.config.DynamicConfiguration; import com.netflix.config.FixedDelayPollingScheduler; import com.netflix.spinnaker.kork.eureka.EurekaAutoConfiguration; +import jakarta.annotation.PreDestroy; import java.util.*; import java.util.concurrent.TimeUnit; -import javax.annotation.PreDestroy; import org.apache.commons.configuration.AbstractConfiguration; import org.apache.commons.configuration.CompositeConfiguration; import org.springframework.beans.BeansException; diff --git a/kork-eureka/src/main/java/com/netflix/spinnaker/kork/eureka/EurekaStatusSubscriber.java b/kork-eureka/src/main/java/com/netflix/spinnaker/kork/eureka/EurekaStatusSubscriber.java index 5502d1dac..f2f3f7c1c 100644 --- a/kork-eureka/src/main/java/com/netflix/spinnaker/kork/eureka/EurekaStatusSubscriber.java +++ b/kork-eureka/src/main/java/com/netflix/spinnaker/kork/eureka/EurekaStatusSubscriber.java @@ -28,8 +28,8 @@ import com.netflix.spinnaker.kork.discovery.InstanceStatus; import com.netflix.spinnaker.kork.discovery.RemoteStatusChangedEvent; import com.netflix.spinnaker.kork.exceptions.SystemException; +import jakarta.annotation.PreDestroy; import java.util.Objects; -import javax.annotation.PreDestroy; import org.springframework.context.ApplicationEventPublisher; public class EurekaStatusSubscriber implements DiscoveryStatusPublisher { diff --git a/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/lock/RedisLockManager.java b/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/lock/RedisLockManager.java index bd00586b8..d0fca3d3a 100644 --- a/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/lock/RedisLockManager.java +++ b/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/lock/RedisLockManager.java @@ -25,6 +25,8 @@ import com.netflix.spectator.api.patterns.LongTaskTimer; import com.netflix.spinnaker.kork.jedis.RedisClientDelegate; import com.netflix.spinnaker.kork.lock.RefreshableLockManager; +import jakarta.annotation.Nonnull; +import jakarta.annotation.PreDestroy; import java.io.IOException; import java.time.Clock; import java.time.Duration; @@ -34,8 +36,6 @@ import java.util.Optional; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; -import javax.annotation.Nonnull; -import javax.annotation.PreDestroy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/kork-plugins-api/kork-plugins-api.gradle b/kork-plugins-api/kork-plugins-api.gradle index d048a871a..9fcfd65fe 100644 --- a/kork-plugins-api/kork-plugins-api.gradle +++ b/kork-plugins-api/kork-plugins-api.gradle @@ -21,7 +21,7 @@ dependencies { api(platform(project(":spinnaker-dependencies"))) api "org.slf4j:slf4j-api" - api "javax.annotation:javax.annotation-api" + api "jakarta.annotation:jakarta.annotation-api" api project(":kork-annotations") api "org.pf4j:pf4j" diff --git a/kork-pubsub-aws/kork-pubsub-aws.gradle b/kork-pubsub-aws/kork-pubsub-aws.gradle index c403e545e..fb3784a35 100644 --- a/kork-pubsub-aws/kork-pubsub-aws.gradle +++ b/kork-pubsub-aws/kork-pubsub-aws.gradle @@ -26,7 +26,7 @@ dependencies { implementation project(':kork-pubsub') implementation 'org.springframework.boot:spring-boot-autoconfigure' - implementation 'javax.validation:validation-api' + implementation 'jakarta.validation:jakarta.validation-api' api 'com.amazonaws:aws-java-sdk-sns' api 'com.amazonaws:aws-java-sdk-sqs' diff --git a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SNSPublisherProvider.java b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SNSPublisherProvider.java index 3bded29b4..2352ce249 100644 --- a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SNSPublisherProvider.java +++ b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SNSPublisherProvider.java @@ -28,10 +28,10 @@ import com.netflix.spinnaker.kork.pubsub.PubsubPublishers; import com.netflix.spinnaker.kork.pubsub.aws.config.AmazonPubsubProperties; import com.netflix.spinnaker.kork.pubsub.model.PubsubPublisher; +import jakarta.annotation.PostConstruct; import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; -import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SQSSubscriberProvider.java b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SQSSubscriberProvider.java index ee0e924ed..aa4515bf2 100644 --- a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SQSSubscriberProvider.java +++ b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/SQSSubscriberProvider.java @@ -30,12 +30,12 @@ import com.netflix.spinnaker.kork.pubsub.aws.api.AmazonPubsubMessageHandlerFactory; import com.netflix.spinnaker.kork.pubsub.aws.config.AmazonPubsubProperties; import com.netflix.spinnaker.kork.pubsub.model.PubsubSubscriber; +import jakarta.annotation.PostConstruct; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; -import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubConfig.java b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubConfig.java index b3e7bba94..f60818838 100644 --- a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubConfig.java +++ b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubConfig.java @@ -29,7 +29,7 @@ import com.netflix.spinnaker.kork.pubsub.aws.SQSSubscriberProvider; import com.netflix.spinnaker.kork.pubsub.aws.api.AmazonMessageAcknowledger; import com.netflix.spinnaker.kork.pubsub.aws.api.AmazonPubsubMessageHandlerFactory; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubProperties.java b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubProperties.java index 5c77c89a9..156df5121 100644 --- a/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubProperties.java +++ b/kork-pubsub-aws/src/main/java/com/netflix/spinnaker/kork/pubsub/aws/config/AmazonPubsubProperties.java @@ -16,10 +16,10 @@ package com.netflix.spinnaker.kork.pubsub.aws.config; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotEmpty; import java.util.Collections; import java.util.List; -import javax.validation.Valid; -import javax.validation.constraints.NotEmpty; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/kork-sql/kork-sql.gradle b/kork-sql/kork-sql.gradle index 032ef2e05..96b058139 100644 --- a/kork-sql/kork-sql.gradle +++ b/kork-sql/kork-sql.gradle @@ -13,7 +13,7 @@ dependencies { api "com.zaxxer:HikariCP" implementation 'com.github.blagerweij:liquibase-sessionlock:1.5.0' - implementation "javax.validation:validation-api" + implementation "jakarta.validation:jakarta.validation-api" implementation "org.hibernate.validator:hibernate-validator" testImplementation project(":kork-sql-test") diff --git a/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/SqlProperties.kt b/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/SqlProperties.kt index 73b89b21d..e3b813c32 100644 --- a/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/SqlProperties.kt +++ b/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/SqlProperties.kt @@ -18,9 +18,9 @@ package com.netflix.spinnaker.kork.sql.config import org.springframework.boot.context.properties.ConfigurationProperties import org.springframework.validation.annotation.Validated import java.sql.Connection -import javax.validation.Constraint -import javax.validation.ConstraintValidator -import javax.validation.ConstraintValidatorContext +import jakarta.validation.Constraint +import jakarta.validation.ConstraintValidator +import jakarta.validation.ConstraintValidatorContext import kotlin.reflect.KClass /** diff --git a/kork-web/src/main/groovy/com/netflix/spinnaker/config/OkHttpMetricsInterceptorProperties.java b/kork-web/src/main/groovy/com/netflix/spinnaker/config/OkHttpMetricsInterceptorProperties.java index cd8951bef..58e941829 100644 --- a/kork-web/src/main/groovy/com/netflix/spinnaker/config/OkHttpMetricsInterceptorProperties.java +++ b/kork-web/src/main/groovy/com/netflix/spinnaker/config/OkHttpMetricsInterceptorProperties.java @@ -15,8 +15,8 @@ */ package com.netflix.spinnaker.config; +import jakarta.annotation.PostConstruct; import java.util.regex.Pattern; -import javax.annotation.PostConstruct; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.util.StringUtils; diff --git a/kork-web/src/main/groovy/com/netflix/spinnaker/filters/AuthenticatedRequestFilter.groovy b/kork-web/src/main/groovy/com/netflix/spinnaker/filters/AuthenticatedRequestFilter.groovy index 53050b8f9..fc65dbf1e 100644 --- a/kork-web/src/main/groovy/com/netflix/spinnaker/filters/AuthenticatedRequestFilter.groovy +++ b/kork-web/src/main/groovy/com/netflix/spinnaker/filters/AuthenticatedRequestFilter.groovy @@ -24,13 +24,13 @@ import org.springframework.security.core.context.SecurityContextHolder import org.springframework.security.core.context.SecurityContextImpl import org.springframework.security.core.userdetails.UserDetails -import javax.servlet.Filter -import javax.servlet.FilterChain -import javax.servlet.FilterConfig -import javax.servlet.ServletException -import javax.servlet.ServletRequest -import javax.servlet.ServletResponse -import javax.servlet.http.HttpServletRequest +import jakarta.servlet.Filter +import jakarta.servlet.FilterChain +import jakarta.servlet.FilterConfig +import jakarta.servlet.ServletException +import jakarta.servlet.ServletRequest +import jakarta.servlet.ServletResponse +import jakarta.servlet.http.HttpServletRequest import java.security.cert.X509Certificate @Slf4j diff --git a/kork-web/src/main/java/com/netflix/spinnaker/config/AuthenticatedRequestConfiguration.java b/kork-web/src/main/java/com/netflix/spinnaker/config/AuthenticatedRequestConfiguration.java index fff05537f..177120e93 100644 --- a/kork-web/src/main/java/com/netflix/spinnaker/config/AuthenticatedRequestConfiguration.java +++ b/kork-web/src/main/java/com/netflix/spinnaker/config/AuthenticatedRequestConfiguration.java @@ -18,10 +18,10 @@ import com.netflix.spinnaker.security.AuthenticatedRequest; import com.netflix.spinnaker.security.AuthenticatedRequestDecorator; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; import java.util.HashMap; import java.util.Map; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; import org.springframework.boot.web.reactive.function.client.WebClientCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/BaseExceptionHandlers.java b/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/BaseExceptionHandlers.java index ba033df27..202e8fef1 100644 --- a/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/BaseExceptionHandlers.java +++ b/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/BaseExceptionHandlers.java @@ -16,8 +16,8 @@ package com.netflix.spinnaker.kork.web.exceptions; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.boot.web.servlet.error.DefaultErrorAttributes; import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; diff --git a/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/GenericExceptionHandlers.java b/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/GenericExceptionHandlers.java index 1f9a0cefa..e7a4d8438 100644 --- a/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/GenericExceptionHandlers.java +++ b/kork-web/src/main/java/com/netflix/spinnaker/kork/web/exceptions/GenericExceptionHandlers.java @@ -20,13 +20,13 @@ import com.google.common.io.CharStreams; import com.netflix.spinnaker.kork.exceptions.HasAdditionalAttributes; import com.netflix.spinnaker.kork.exceptions.UserException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStreamReader; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.annotation.AnnotationUtils; diff --git a/kork-web/src/main/java/com/netflix/spinnaker/kork/web/interceptors/MetricsInterceptor.java b/kork-web/src/main/java/com/netflix/spinnaker/kork/web/interceptors/MetricsInterceptor.java index 4d1536452..d02fd23dd 100644 --- a/kork-web/src/main/java/com/netflix/spinnaker/kork/web/interceptors/MetricsInterceptor.java +++ b/kork-web/src/main/java/com/netflix/spinnaker/kork/web/interceptors/MetricsInterceptor.java @@ -22,16 +22,16 @@ import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.histogram.PercentileDistributionSummary; import com.netflix.spectator.api.histogram.PercentileTimer; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Collection; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerMapping; -import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; /** * An interceptor that logs Controller metrics to an underlying {@link @@ -43,7 +43,7 @@ * 500, etc.) - success (true/false depending on whether the request resulted in an exception) - * cause (if success == false, the name of the raised exception) */ -public class MetricsInterceptor extends HandlerInterceptorAdapter { +public class MetricsInterceptor implements HandlerInterceptor { static final String TIMER_ATTRIBUTE = "Metrics_startTime"; private final Registry registry;