Skip to content

Commit

Permalink
Merge branch '3.1.x' into 3.2.x
Browse files Browse the repository at this point in the history
Closes gh-39091
  • Loading branch information
wilkinsona committed Jan 11, 2024
2 parents d3b93f5 + 45c3285 commit 7087897
Show file tree
Hide file tree
Showing 150 changed files with 358 additions and 353 deletions.
11 changes: 6 additions & 5 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ if (versions.springFramework.contains("-")) {
}
}

checkstyle {
toolVersion = "10.12.4"
}

dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
checkstyle("com.puppycrawl.tools:checkstyle:${checkstyle.toolVersion}")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}")

implementation(platform("org.springframework:spring-framework-bom:${versions.springFramework}"))
implementation("com.diffplug.gradle:goomph:3.37.2")
Expand All @@ -58,10 +63,6 @@ dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

checkstyle {
toolVersion = "10.12.4"
}

gradlePlugin {
plugins {
annotationProcessorPlugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -243,6 +243,8 @@ private void configureSpringJavaFormat(Project project) {
checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();
checkstyleDependencies
.add(project.getDependencies().create("com.puppycrawl.tools:checkstyle:" + checkstyle.getToolVersion()));
checkstyleDependencies
.add(project.getDependencies().create("io.spring.javaformat:spring-javaformat-checkstyle:" + version));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,7 +62,7 @@ private SSLSocketFactory createSslSocketFactory() throws Exception {
return context.getSocketFactory();
}

private static class SkipHostnameVerifier implements HostnameVerifier {
private static final class SkipHostnameVerifier implements HostnameVerifier {

@Override
public boolean verify(String s, SSLSession sslSession) {
Expand All @@ -71,7 +71,7 @@ public boolean verify(String s, SSLSession sslSession) {

}

private static class SkipX509TrustManager implements X509TrustManager {
private static final class SkipX509TrustManager implements X509TrustManager {

@Override
public X509Certificate[] getAcceptedIssuers() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,7 +54,7 @@ public LogFileWebEndpoint logFileWebEndpoint(ObjectProvider<LogFile> logFile,
return new LogFileWebEndpoint(logFile.getIfAvailable(), properties.getExternalFile());
}

private static class LogFileCondition extends SpringBootCondition {
private static final class LogFileCondition extends SpringBootCondition {

@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -92,7 +92,7 @@ public MeterFilter jerseyMetricsUriTagFilter(MetricsProperties metricsProperties
/**
* An {@link AnnotationFinder} that uses {@link AnnotationUtils}.
*/
private static class AnnotationUtilsAnnotationFinder implements AnnotationFinder {
private static final class AnnotationUtilsAnnotationFinder implements AnnotationFinder {

@Override
public <A extends Annotation> A findAnnotation(AnnotatedElement annotatedElement, Class<A> annotationType) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -311,7 +311,7 @@ protected RequestMatcher createDelegate(WebApplicationContext context,
/**
* Factory used to create a {@link RequestMatcher}.
*/
private static class RequestMatcherFactory {
private static final class RequestMatcherFactory {

RequestMatcher antPath(RequestMatcherProvider matcherProvider, String... parts) {
StringBuilder pattern = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,7 +75,7 @@ void healthComponentsAlwaysPresent() {
});
}

private static class TestHealthIndicator implements HealthIndicator {
private static final class TestHealthIndicator implements HealthIndicator {

@Override
public Health health() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,7 +70,7 @@ void healthComponentsAlwaysPresent() {
});
}

private static class TestHealthIndicator implements HealthIndicator {
private static final class TestHealthIndicator implements HealthIndicator {

@Override
public Health health() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -138,7 +138,7 @@ CompositeHealthContributor brokerHealthContributor() {

}

private static class TestHealthEndpointGroup implements HealthEndpointGroup {
private static final class TestHealthEndpointGroup implements HealthEndpointGroup {

private final StatusAggregator statusAggregator = new SimpleStatusAggregator();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -561,11 +561,11 @@ public boolean supportsContext(Context context) {

}

private static class CustomContext extends Context {
private static final class CustomContext extends Context {

}

private static class CalledHandlers {
private static final class CalledHandlers {

private final List<ObservationHandler<?>> calledHandlers = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -74,7 +74,7 @@ Customizer2 customizer2(CalledCustomizers calledCustomizers) {

}

private static class CalledCustomizers {
private static final class CalledCustomizers {

private final List<ObservationRegistryCustomizer<?>> customizers = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void shouldRegisterSdkMeterProviderIfAvailable() {
}

@Configuration(proxyBeanMethods = false)
private static class UserConfiguration {
private static final class UserConfiguration {

@Bean
OpenTelemetry customOpenTelemetry() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void shouldNotDependOnOpenTelemetrySdk() {

@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(OpenTelemetryProperties.class)
private static class TestConfiguration {
private static final class TestConfiguration {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static CapturingObservationHandler registerCapturingObservationHandler(
return handler;
}

private static class CapturingObservationHandler implements ObservationHandler<Context> {
private static final class CapturingObservationHandler implements ObservationHandler<Context> {

private final AtomicReference<Context> context = new AtomicReference<>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -443,7 +443,7 @@ static class AdditionalSpanHandler extends SpanHandler {
}

@Configuration(proxyBeanMethods = false)
private static class CustomConfiguration {
private static final class CustomConfiguration {

@Bean
Tracing customTracing() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -162,7 +162,7 @@ void shouldConfigureSpanTagAnnotationHandler() {
}

@Configuration(proxyBeanMethods = false)
private static class TracerConfiguration {
private static final class TracerConfiguration {

@Bean
Tracer tracer() {
Expand All @@ -172,7 +172,7 @@ Tracer tracer() {
}

@Configuration(proxyBeanMethods = false)
private static class PropagatorConfiguration {
private static final class PropagatorConfiguration {

@Bean
Propagator propagator() {
Expand All @@ -182,7 +182,7 @@ Propagator propagator() {
}

@Configuration(proxyBeanMethods = false)
private static class CustomConfiguration {
private static final class CustomConfiguration {

@Bean
DefaultTracingObservationHandler customDefaultTracingObservationHandler() {
Expand Down Expand Up @@ -218,7 +218,7 @@ SpanAspect customSpanAspect(MethodInvocationProcessor methodInvocationProcessor)
}

@Configuration(proxyBeanMethods = false)
private static class SpanTagAnnotationHandlerConfiguration {
private static final class SpanTagAnnotationHandlerConfiguration {

@Bean
SpanTagAnnotationHandler spanTagAnnotationHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void shouldBackOffIfMicrometerTracingIsMissing() {
}

@Configuration(proxyBeanMethods = false)
private static class CustomTracerConfiguration {
private static final class CustomTracerConfiguration {

@Bean
Tracer customTracer() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -309,7 +309,7 @@ private List<TextMapPropagator> getInjectors(TextMapPropagator propagator) {
}

@Configuration(proxyBeanMethods = false)
private static class MeterProviderConfiguration {
private static final class MeterProviderConfiguration {

@Bean
MeterProvider meterProvider() {
Expand All @@ -322,7 +322,7 @@ MeterProvider meterProvider() {
}

@Configuration(proxyBeanMethods = false)
private static class AdditionalSpanProcessorConfiguration {
private static final class AdditionalSpanProcessorConfiguration {

@Bean
SpanProcessor customSpanProcessor() {
Expand All @@ -332,7 +332,7 @@ SpanProcessor customSpanProcessor() {
}

@Configuration(proxyBeanMethods = false)
private static class MultipleSpanExporterConfiguration {
private static final class MultipleSpanExporterConfiguration {

@Bean
SpanExporter spanExporter1() {
Expand All @@ -347,7 +347,7 @@ SpanExporter spanExporter2() {
}

@Configuration(proxyBeanMethods = false)
private static class CustomConfiguration {
private static final class CustomConfiguration {

@Bean
SpanProcessors customSpanProcessors() {
Expand Down Expand Up @@ -427,7 +427,7 @@ SpanCustomizer customSpanCustomizer() {
}

@Configuration(proxyBeanMethods = false)
private static class SdkTracerProviderCustomizationConfiguration {
private static final class SdkTracerProviderCustomizationConfiguration {

@Bean
@Order(1)
Expand All @@ -449,7 +449,7 @@ SdkTracerProviderBuilderCustomizer sdkTracerProviderBuilderCustomizerTwo() {

}

private static class DummySpanExporter implements SpanExporter {
private static final class DummySpanExporter implements SpanExporter {

@Override
public CompletableResultCode export(Collection<SpanData> spans) {
Expand All @@ -469,7 +469,7 @@ public CompletableResultCode shutdown() {
}

@Configuration(proxyBeanMethods = false)
private static class InMemoryRecordingSpanExporterConfiguration {
private static final class InMemoryRecordingSpanExporterConfiguration {

@Bean
InMemoryRecordingSpanExporter spanExporter() {
Expand All @@ -478,7 +478,7 @@ InMemoryRecordingSpanExporter spanExporter() {

}

private static class InMemoryRecordingSpanExporter implements SpanExporter {
private static final class InMemoryRecordingSpanExporter implements SpanExporter {

private final List<SpanData> exportedSpans = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -127,7 +127,7 @@ void testConnectionFactoryWithOverridesWhenUsingCustomConnectionDetails() {
}

@Configuration(proxyBeanMethods = false)
private static class CustomHttpExporterConfiguration {
private static final class CustomHttpExporterConfiguration {

@Bean
OtlpHttpSpanExporter customOtlpHttpSpanExporter() {
Expand All @@ -137,7 +137,7 @@ OtlpHttpSpanExporter customOtlpHttpSpanExporter() {
}

@Configuration(proxyBeanMethods = false)
private static class CustomGrpcExporterConfiguration {
private static final class CustomGrpcExporterConfiguration {

@Bean
OtlpGrpcSpanExporter customOtlpGrpcSpanExporter() {
Expand Down
Loading

0 comments on commit 7087897

Please sign in to comment.