Skip to content

Commit 3882dcc

Browse files
izeyemhalbritter
authored andcommitted
Polish
See gh-42457
1 parent 6f9c270 commit 3882dcc

File tree

9 files changed

+32
-34
lines changed

9 files changed

+32
-34
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/logging/opentelemetry/otlp/OtlpLoggingConfigurations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static class ConnectionDetails {
4444
@Bean
4545
@ConditionalOnMissingBean
4646
@ConditionalOnProperty(prefix = "management.otlp.logging", name = "endpoint")
47-
OtlpLoggingConnectionDetails otlpLogsConnectionDetails(OtlpLoggingProperties properties) {
47+
OtlpLoggingConnectionDetails otlpLoggingConnectionDetails(OtlpLoggingProperties properties) {
4848
return new PropertiesOtlpLoggingConnectionDetails(properties);
4949
}
5050

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/opentelemetry/OpenTelemetryLoggingAutoConfigurationTests.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.junit.jupiter.params.ParameterizedTest;
3333
import org.junit.jupiter.params.provider.ValueSource;
3434

35+
import org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryAutoConfiguration;
3536
import org.springframework.boot.autoconfigure.AutoConfigurations;
3637
import org.springframework.boot.test.context.FilteredClassLoader;
3738
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
@@ -50,9 +51,8 @@ class OpenTelemetryLoggingAutoConfigurationTests {
5051
private final ApplicationContextRunner contextRunner;
5152

5253
OpenTelemetryLoggingAutoConfigurationTests() {
53-
this.contextRunner = new ApplicationContextRunner().withConfiguration(AutoConfigurations.of(
54-
org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryAutoConfiguration.class,
55-
OpenTelemetryLoggingAutoConfiguration.class));
54+
this.contextRunner = new ApplicationContextRunner().withConfiguration(AutoConfigurations
55+
.of(OpenTelemetryAutoConfiguration.class, OpenTelemetryLoggingAutoConfiguration.class));
5656
}
5757

5858
@Test
@@ -82,8 +82,8 @@ void shouldBackOffOnCustomBeans() {
8282
}
8383

8484
@Test
85-
void shouldAllowMultipleLogRecordExporter() {
86-
this.contextRunner.withUserConfiguration(MultipleLogRecordExporterConfig.class).run((context) -> {
85+
void shouldAllowMultipleLogRecordExporters() {
86+
this.contextRunner.withUserConfiguration(MultipleLogRecordExportersConfig.class).run((context) -> {
8787
assertThat(context).hasSingleBean(BatchLogRecordProcessor.class);
8888
assertThat(context.getBeansOfType(LogRecordExporter.class)).hasSize(2);
8989
assertThat(context).hasBean("customLogRecordExporter1");
@@ -92,8 +92,8 @@ void shouldAllowMultipleLogRecordExporter() {
9292
}
9393

9494
@Test
95-
void shouldAllowMultipleLogRecordProcessorInAdditionToBatchLogRecordProcessor() {
96-
this.contextRunner.withUserConfiguration(MultipleLogRecordProcessorConfig.class).run((context) -> {
95+
void shouldAllowMultipleLogRecordProcessorsInAdditionToBatchLogRecordProcessor() {
96+
this.contextRunner.withUserConfiguration(MultipleLogRecordProcessorsConfig.class).run((context) -> {
9797
assertThat(context).hasSingleBean(BatchLogRecordProcessor.class);
9898
assertThat(context).hasSingleBean(SdkLoggerProvider.class);
9999
assertThat(context.getBeansOfType(LogRecordProcessor.class)).hasSize(3);
@@ -104,11 +104,11 @@ void shouldAllowMultipleLogRecordProcessorInAdditionToBatchLogRecordProcessor()
104104
}
105105

106106
@Test
107-
void shouldAllowMultipleSdkLoggerProviderBuilderCustomizer() {
108-
this.contextRunner.withUserConfiguration(MultipleSdkLoggerProviderBuilderCustomizerConfig.class)
107+
void shouldAllowMultipleSdkLoggerProviderBuilderCustomizers() {
108+
this.contextRunner.withUserConfiguration(MultipleSdkLoggerProviderBuilderCustomizersConfig.class)
109109
.run((context) -> {
110110
assertThat(context).hasSingleBean(SdkLoggerProvider.class);
111-
assertThat(context.getBeansOfType(NoopSdkLoggerProviderBuilderCustomizer.class)).hasSize(2);
111+
assertThat(context.getBeansOfType(SdkLoggerProviderBuilderCustomizer.class)).hasSize(2);
112112
assertThat(context).hasBean("customSdkLoggerProviderBuilderCustomizer1");
113113
assertThat(context).hasBean("customSdkLoggerProviderBuilderCustomizer2");
114114
assertThat(context
@@ -136,7 +136,7 @@ public SdkLoggerProvider customSdkLoggerProvider() {
136136
}
137137

138138
@Configuration(proxyBeanMethods = false)
139-
public static class MultipleLogRecordExporterConfig {
139+
public static class MultipleLogRecordExportersConfig {
140140

141141
@Bean
142142
public LogRecordExporter customLogRecordExporter1() {
@@ -151,7 +151,7 @@ public LogRecordExporter customLogRecordExporter2() {
151151
}
152152

153153
@Configuration(proxyBeanMethods = false)
154-
public static class MultipleLogRecordProcessorConfig {
154+
public static class MultipleLogRecordProcessorsConfig {
155155

156156
@Bean
157157
public LogRecordProcessor customLogRecordProcessor1() {
@@ -166,7 +166,7 @@ public LogRecordProcessor customLogRecordProcessor2() {
166166
}
167167

168168
@Configuration(proxyBeanMethods = false)
169-
public static class MultipleSdkLoggerProviderBuilderCustomizerConfig {
169+
public static class MultipleSdkLoggerProviderBuilderCustomizersConfig {
170170

171171
@Bean
172172
public SdkLoggerProviderBuilderCustomizer customSdkLoggerProviderBuilderCustomizer1() {

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/opentelemetry/otlp/OtlpLoggingAutoConfigurationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ void shouldBackOffWhenCustomGrpcExporterIsDefined() {
8989
}
9090

9191
@Test
92-
void shouldBackOffWhenCustomOtlpLogsConnectionDetailsIsDefined() {
93-
this.contextRunner.withUserConfiguration(CustomOtlpLogsConnectionDetails.class).run((context) -> {
92+
void shouldBackOffWhenCustomOtlpLoggingConnectionDetailsIsDefined() {
93+
this.contextRunner.withUserConfiguration(CustomOtlpLoggingConnectionDetails.class).run((context) -> {
9494
assertThat(context).hasSingleBean(OtlpLoggingConnectionDetails.class)
9595
.doesNotHaveBean(PropertiesOtlpLoggingConnectionDetails.class);
9696
OtlpHttpLogRecordExporter otlpHttpLogRecordExporter = context.getBean(OtlpHttpLogRecordExporter.class);
@@ -121,10 +121,10 @@ public OtlpGrpcLogRecordExporter customOtlpGrpcLogRecordExporter() {
121121
}
122122

123123
@Configuration(proxyBeanMethods = false)
124-
public static class CustomOtlpLogsConnectionDetails {
124+
public static class CustomOtlpLoggingConnectionDetails {
125125

126126
@Bean
127-
public OtlpLoggingConnectionDetails customOtlpLogsConnectionDetails() {
127+
public OtlpLoggingConnectionDetails customOtlpLoggingConnectionDetails() {
128128
return (transport) -> "https://otel.example.com/v1/logs";
129129
}
130130

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/OnEnabledTracingConditionTests.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class OnEnabledTracingConditionTests {
4040
@Test
4141
void shouldMatchIfNoPropertyIsSet() {
4242
OnEnabledTracingCondition condition = new OnEnabledTracingCondition();
43-
ConditionOutcome outcome = condition.getMatchOutcome(mockConditionContext(), mockMetaData(""));
43+
ConditionOutcome outcome = condition.getMatchOutcome(mockConditionContext(), mockMetadata(""));
4444
assertThat(outcome.isMatch()).isTrue();
4545
assertThat(outcome.getMessage()).isEqualTo("@ConditionalOnEnabledTracing tracing is enabled by default");
4646
}
@@ -49,7 +49,7 @@ void shouldMatchIfNoPropertyIsSet() {
4949
void shouldNotMatchIfGlobalPropertyIsFalse() {
5050
OnEnabledTracingCondition condition = new OnEnabledTracingCondition();
5151
ConditionOutcome outcome = condition
52-
.getMatchOutcome(mockConditionContext(Map.of("management.tracing.enabled", "false")), mockMetaData(""));
52+
.getMatchOutcome(mockConditionContext(Map.of("management.tracing.enabled", "false")), mockMetadata(""));
5353
assertThat(outcome.isMatch()).isFalse();
5454
assertThat(outcome.getMessage()).isEqualTo("@ConditionalOnEnabledTracing management.tracing.enabled is false");
5555
}
@@ -58,7 +58,7 @@ void shouldNotMatchIfGlobalPropertyIsFalse() {
5858
void shouldMatchIfGlobalPropertyIsTrue() {
5959
OnEnabledTracingCondition condition = new OnEnabledTracingCondition();
6060
ConditionOutcome outcome = condition
61-
.getMatchOutcome(mockConditionContext(Map.of("management.tracing.enabled", "true")), mockMetaData(""));
61+
.getMatchOutcome(mockConditionContext(Map.of("management.tracing.enabled", "true")), mockMetadata(""));
6262
assertThat(outcome.isMatch()).isTrue();
6363
assertThat(outcome.getMessage()).isEqualTo("@ConditionalOnEnabledTracing management.tracing.enabled is true");
6464
}
@@ -68,7 +68,7 @@ void shouldNotMatchIfExporterPropertyIsFalse() {
6868
OnEnabledTracingCondition condition = new OnEnabledTracingCondition();
6969
ConditionOutcome outcome = condition.getMatchOutcome(
7070
mockConditionContext(Map.of("management.zipkin.tracing.export.enabled", "false")),
71-
mockMetaData("zipkin"));
71+
mockMetadata("zipkin"));
7272
assertThat(outcome.isMatch()).isFalse();
7373
assertThat(outcome.getMessage())
7474
.isEqualTo("@ConditionalOnEnabledTracing management.zipkin.tracing.export.enabled is false");
@@ -79,7 +79,7 @@ void shouldMatchIfExporterPropertyIsTrue() {
7979
OnEnabledTracingCondition condition = new OnEnabledTracingCondition();
8080
ConditionOutcome outcome = condition.getMatchOutcome(
8181
mockConditionContext(Map.of("management.zipkin.tracing.export.enabled", "true")),
82-
mockMetaData("zipkin"));
82+
mockMetadata("zipkin"));
8383
assertThat(outcome.isMatch()).isTrue();
8484
assertThat(outcome.getMessage())
8585
.isEqualTo("@ConditionalOnEnabledTracing management.zipkin.tracing.export.enabled is true");
@@ -90,7 +90,7 @@ void exporterPropertyShouldOverrideGlobalPropertyIfTrue() {
9090
OnEnabledTracingCondition condition = new OnEnabledTracingCondition();
9191
ConditionOutcome outcome = condition.getMatchOutcome(mockConditionContext(
9292
Map.of("management.tracing.enabled", "false", "management.zipkin.tracing.export.enabled", "true")),
93-
mockMetaData("zipkin"));
93+
mockMetadata("zipkin"));
9494
assertThat(outcome.isMatch()).isTrue();
9595
assertThat(outcome.getMessage())
9696
.isEqualTo("@ConditionalOnEnabledTracing management.zipkin.tracing.export.enabled is true");
@@ -101,7 +101,7 @@ void exporterPropertyShouldOverrideGlobalPropertyIfFalse() {
101101
OnEnabledTracingCondition condition = new OnEnabledTracingCondition();
102102
ConditionOutcome outcome = condition.getMatchOutcome(mockConditionContext(
103103
Map.of("management.tracing.enabled", "true", "management.zipkin.tracing.export.enabled", "false")),
104-
mockMetaData("zipkin"));
104+
mockMetadata("zipkin"));
105105
assertThat(outcome.isMatch()).isFalse();
106106
assertThat(outcome.getMessage())
107107
.isEqualTo("@ConditionalOnEnabledTracing management.zipkin.tracing.export.enabled is false");
@@ -119,7 +119,7 @@ private ConditionContext mockConditionContext(Map<String, String> properties) {
119119
return context;
120120
}
121121

122-
private AnnotatedTypeMetadata mockMetaData(String exporter) {
122+
private AnnotatedTypeMetadata mockMetadata(String exporter) {
123123
AnnotatedTypeMetadata metadata = mock(AnnotatedTypeMetadata.class);
124124
given(metadata.getAnnotationAttributes(ConditionalOnEnabledTracing.class.getName()))
125125
.willReturn(Map.of("value", exporter));

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/JCachePropertiesCustomizer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public interface JCachePropertiesCustomizer {
3434
/**
3535
* Customize the properties.
3636
* @param properties the current properties
37-
*
3837
*/
3938
void customize(Properties properties);
4039

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static class Pageable {
8484
private int maxPageSize = 2000;
8585

8686
/**
87-
* Configures how to render spring data Pageable instances.
87+
* Configures how to render Spring Data Pageable instances.
8888
*/
8989
private PageSerializationMode serializationMode = PageSerializationMode.DIRECT;
9090

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnExpressionTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ void expressionEvaluationWithNoBeanFactoryDoesNotMatch() {
6565
MockEnvironment environment = new MockEnvironment();
6666
ConditionContext conditionContext = mock(ConditionContext.class);
6767
given(conditionContext.getEnvironment()).willReturn(environment);
68-
ConditionOutcome outcome = condition.getMatchOutcome(conditionContext, mockMetaData("invalid-spel"));
68+
ConditionOutcome outcome = condition.getMatchOutcome(conditionContext, mockMetadata("invalid-spel"));
6969
assertThat(outcome.isMatch()).isFalse();
7070
assertThat(outcome.getMessage()).contains("invalid-spel").contains("no BeanFactory available");
7171
}
7272

73-
private AnnotatedTypeMetadata mockMetaData(String value) {
73+
private AnnotatedTypeMetadata mockMetadata(String value) {
7474
AnnotatedTypeMetadata metadata = mock(AnnotatedTypeMetadata.class);
7575
given(metadata.getAnnotationAttributes(ConditionalOnExpression.class.getName()))
7676
.willReturn(Collections.singletonMap("value", value));

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnJndiTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ void jndiLocationBound() {
101101

102102
@Test
103103
void jndiLocationNotFound() {
104-
ConditionOutcome outcome = this.condition.getMatchOutcome(null, mockMetaData("java:/a"));
104+
ConditionOutcome outcome = this.condition.getMatchOutcome(null, mockMetadata("java:/a"));
105105
assertThat(outcome.isMatch()).isFalse();
106106
}
107107

108108
@Test
109109
void jndiLocationFound() {
110110
this.condition.setFoundLocation("java:/b");
111-
ConditionOutcome outcome = this.condition.getMatchOutcome(null, mockMetaData("java:/a", "java:/b"));
111+
ConditionOutcome outcome = this.condition.getMatchOutcome(null, mockMetadata("java:/a", "java:/b"));
112112
assertThat(outcome.isMatch()).isTrue();
113113
}
114114

@@ -117,7 +117,7 @@ private void setupJndi() {
117117
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, TestableInitialContextFactory.class.getName());
118118
}
119119

120-
private AnnotatedTypeMetadata mockMetaData(String... value) {
120+
private AnnotatedTypeMetadata mockMetadata(String... value) {
121121
AnnotatedTypeMetadata metadata = mock(AnnotatedTypeMetadata.class);
122122
Map<String, Object> attributes = new HashMap<>();
123123
attributes.put("value", value);

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,6 @@ bom {
14891489
group("com.oracle.database.security") {
14901490
modules = [
14911491
"oraclepki"
1492-
14931492
]
14941493
}
14951494
group("com.oracle.database.xml") {

0 commit comments

Comments
 (0)