Skip to content

Commit c6c139d

Browse files
committed
Merge branch '1.5.x' into 2.0.x
2 parents 3f3d1d1 + 8f1be4c commit c6c139d

File tree

2,320 files changed

+23855
-39473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,320 files changed

+23855
-39473
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</property>
2525
</activation>
2626
<properties>
27-
<spring-javaformat.version>0.0.9</spring-javaformat.version>
27+
<spring-javaformat.version>0.0.11</spring-javaformat.version>
2828
<nohttp-checkstyle.version>0.0.1.RELEASE</nohttp-checkstyle.version>
2929
</properties>
3030
<build>

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/OnEndpointElementCondition.java

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,15 +40,13 @@ public abstract class OnEndpointElementCondition extends SpringBootCondition {
4040

4141
private final Class<? extends Annotation> annotationType;
4242

43-
protected OnEndpointElementCondition(String prefix,
44-
Class<? extends Annotation> annotationType) {
43+
protected OnEndpointElementCondition(String prefix, Class<? extends Annotation> annotationType) {
4544
this.prefix = prefix;
4645
this.annotationType = annotationType;
4746
}
4847

4948
@Override
50-
public ConditionOutcome getMatchOutcome(ConditionContext context,
51-
AnnotatedTypeMetadata metadata) {
49+
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
5250
AnnotationAttributes annotationAttributes = AnnotationAttributes
5351
.fromMap(metadata.getAnnotationAttributes(this.annotationType.getName()));
5452
String endpointName = annotationAttributes.getString("value");
@@ -59,25 +57,21 @@ public ConditionOutcome getMatchOutcome(ConditionContext context,
5957
return getDefaultEndpointsOutcome(context);
6058
}
6159

62-
protected ConditionOutcome getEndpointOutcome(ConditionContext context,
63-
String endpointName) {
60+
protected ConditionOutcome getEndpointOutcome(ConditionContext context, String endpointName) {
6461
Environment environment = context.getEnvironment();
6562
String enabledProperty = this.prefix + endpointName + ".enabled";
6663
if (environment.containsProperty(enabledProperty)) {
6764
boolean match = environment.getProperty(enabledProperty, Boolean.class, true);
68-
return new ConditionOutcome(match,
69-
ConditionMessage.forCondition(this.annotationType).because(
70-
this.prefix + endpointName + ".enabled is " + match));
65+
return new ConditionOutcome(match, ConditionMessage.forCondition(this.annotationType)
66+
.because(this.prefix + endpointName + ".enabled is " + match));
7167
}
7268
return null;
7369
}
7470

7571
protected ConditionOutcome getDefaultEndpointsOutcome(ConditionContext context) {
76-
boolean match = Boolean.valueOf(context.getEnvironment()
77-
.getProperty(this.prefix + "defaults.enabled", "true"));
78-
return new ConditionOutcome(match,
79-
ConditionMessage.forCondition(this.annotationType).because(
80-
this.prefix + "defaults.enabled is considered " + match));
72+
boolean match = Boolean.valueOf(context.getEnvironment().getProperty(this.prefix + "defaults.enabled", "true"));
73+
return new ConditionOutcome(match, ConditionMessage.forCondition(this.annotationType)
74+
.because(this.prefix + "defaults.enabled is considered " + match));
8175
}
8276

8377
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/amqp/RabbitHealthIndicatorAutoConfiguration.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,13 +46,12 @@
4646
@ConditionalOnEnabledHealthIndicator("rabbit")
4747
@AutoConfigureBefore(HealthIndicatorAutoConfiguration.class)
4848
@AutoConfigureAfter(RabbitAutoConfiguration.class)
49-
public class RabbitHealthIndicatorAutoConfiguration extends
50-
CompositeHealthIndicatorConfiguration<RabbitHealthIndicator, RabbitTemplate> {
49+
public class RabbitHealthIndicatorAutoConfiguration
50+
extends CompositeHealthIndicatorConfiguration<RabbitHealthIndicator, RabbitTemplate> {
5151

5252
private final Map<String, RabbitTemplate> rabbitTemplates;
5353

54-
public RabbitHealthIndicatorAutoConfiguration(
55-
Map<String, RabbitTemplate> rabbitTemplates) {
54+
public RabbitHealthIndicatorAutoConfiguration(Map<String, RabbitTemplate> rabbitTemplates) {
5655
this.rabbitTemplates = rabbitTemplates;
5756
}
5857

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/audit/AuditAutoConfiguration.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ public class AuditAutoConfiguration {
4444

4545
private final AuditEventRepository auditEventRepository;
4646

47-
public AuditAutoConfiguration(
48-
ObjectProvider<AuditEventRepository> auditEventRepository) {
47+
public AuditAutoConfiguration(ObjectProvider<AuditEventRepository> auditEventRepository) {
4948
this.auditEventRepository = auditEventRepository.getIfAvailable();
5049
}
5150

@@ -56,16 +55,14 @@ public AuditListener auditListener() throws Exception {
5655
}
5756

5857
@Bean
59-
@ConditionalOnClass(
60-
name = "org.springframework.security.authentication.event.AbstractAuthenticationEvent")
58+
@ConditionalOnClass(name = "org.springframework.security.authentication.event.AbstractAuthenticationEvent")
6159
@ConditionalOnMissingBean(AbstractAuthenticationAuditListener.class)
6260
public AuthenticationAuditListener authenticationAuditListener() throws Exception {
6361
return new AuthenticationAuditListener();
6462
}
6563

6664
@Bean
67-
@ConditionalOnClass(
68-
name = "org.springframework.security.access.event.AbstractAuthorizationEvent")
65+
@ConditionalOnClass(name = "org.springframework.security.access.event.AbstractAuthorizationEvent")
6966
@ConditionalOnMissingBean(AbstractAuthorizationAuditListener.class)
7067
public AuthorizationAuditListener authorizationAuditListener() throws Exception {
7168
return new AuthorizationAuditListener();

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/audit/AuditEventsEndpointAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,8 +43,7 @@ public class AuditEventsEndpointAutoConfiguration {
4343
@ConditionalOnMissingBean
4444
@ConditionalOnBean(AuditEventRepository.class)
4545
@ConditionalOnEnabledEndpoint
46-
public AuditEventsEndpoint auditEventsEndpoint(
47-
AuditEventRepository auditEventRepository) {
46+
public AuditEventsEndpoint auditEventsEndpoint(AuditEventRepository auditEventRepository) {
4847
return new AuditEventsEndpoint(auditEventRepository);
4948
}
5049

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/beans/BeansEndpointAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,8 +36,7 @@ public class BeansEndpointAutoConfiguration {
3636
@Bean
3737
@ConditionalOnMissingBean
3838
@ConditionalOnEnabledEndpoint
39-
public BeansEndpoint beansEndpoint(
40-
ConfigurableApplicationContext applicationContext) {
39+
public BeansEndpoint beansEndpoint(ConfigurableApplicationContext applicationContext) {
4140
return new BeansEndpoint(applicationContext);
4241
}
4342

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraHealthIndicatorAutoConfiguration.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,15 +49,13 @@
4949
@ConditionalOnBean(CassandraOperations.class)
5050
@ConditionalOnEnabledHealthIndicator("cassandra")
5151
@AutoConfigureBefore(HealthIndicatorAutoConfiguration.class)
52-
@AutoConfigureAfter({ CassandraAutoConfiguration.class,
53-
CassandraDataAutoConfiguration.class })
54-
public class CassandraHealthIndicatorAutoConfiguration extends
55-
CompositeHealthIndicatorConfiguration<CassandraHealthIndicator, CassandraOperations> {
52+
@AutoConfigureAfter({ CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class })
53+
public class CassandraHealthIndicatorAutoConfiguration
54+
extends CompositeHealthIndicatorConfiguration<CassandraHealthIndicator, CassandraOperations> {
5655

5756
private final Map<String, CassandraOperations> cassandraOperations;
5857

59-
public CassandraHealthIndicatorAutoConfiguration(
60-
Map<String, CassandraOperations> cassandraOperations) {
58+
public CassandraHealthIndicatorAutoConfiguration(Map<String, CassandraOperations> cassandraOperations) {
6159
this.cassandraOperations = cassandraOperations;
6260
}
6361

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryAuthorizationException.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,8 +32,7 @@ public CloudFoundryAuthorizationException(Reason reason, String message) {
3232
this(reason, message, null);
3333
}
3434

35-
public CloudFoundryAuthorizationException(Reason reason, String message,
36-
Throwable cause) {
35+
public CloudFoundryAuthorizationException(Reason reason, String message, Throwable cause) {
3736
super(message, cause);
3837
this.reason = reason;
3938
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscoverer.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -50,35 +50,31 @@ public class CloudFoundryWebEndpointDiscoverer extends WebEndpointDiscoverer {
5050
* @param filters filters to apply
5151
*/
5252
public CloudFoundryWebEndpointDiscoverer(ApplicationContext applicationContext,
53-
ParameterValueMapper parameterValueMapper,
54-
EndpointMediaTypes endpointMediaTypes, PathMapper endpointPathMapper,
55-
Collection<OperationInvokerAdvisor> invokerAdvisors,
53+
ParameterValueMapper parameterValueMapper, EndpointMediaTypes endpointMediaTypes,
54+
PathMapper endpointPathMapper, Collection<OperationInvokerAdvisor> invokerAdvisors,
5655
Collection<EndpointFilter<ExposableWebEndpoint>> filters) {
57-
super(applicationContext, parameterValueMapper, endpointMediaTypes,
58-
endpointPathMapper, invokerAdvisors, filters);
56+
super(applicationContext, parameterValueMapper, endpointMediaTypes, endpointPathMapper, invokerAdvisors,
57+
filters);
5958
}
6059

6160
@Override
6261
protected boolean isExtensionExposed(Object extensionBean) {
63-
if (isHealthEndpointExtension(extensionBean)
64-
&& !isCloudFoundryHealthEndpointExtension(extensionBean)) {
62+
if (isHealthEndpointExtension(extensionBean) && !isCloudFoundryHealthEndpointExtension(extensionBean)) {
6563
// Filter regular health endpoint extensions so a CF version can replace them
6664
return false;
6765
}
6866
return true;
6967
}
7068

7169
private boolean isHealthEndpointExtension(Object extensionBean) {
72-
AnnotationAttributes attributes = AnnotatedElementUtils
73-
.getMergedAnnotationAttributes(extensionBean.getClass(),
74-
EndpointWebExtension.class);
70+
AnnotationAttributes attributes = AnnotatedElementUtils.getMergedAnnotationAttributes(extensionBean.getClass(),
71+
EndpointWebExtension.class);
7572
Class<?> endpoint = (attributes != null) ? attributes.getClass("endpoint") : null;
7673
return (endpoint != null && HealthEndpoint.class.isAssignableFrom(endpoint));
7774
}
7875

7976
private boolean isCloudFoundryHealthEndpointExtension(Object extensionBean) {
80-
return AnnotatedElementUtils.hasAnnotation(extensionBean.getClass(),
81-
HealthEndpointCloudFoundryExtension.class);
77+
return AnnotatedElementUtils.hasAnnotation(extensionBean.getClass(), HealthEndpointCloudFoundryExtension.class);
8278
}
8379

8480
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/HealthEndpointCloudFoundryExtension.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
@Target(ElementType.TYPE)
3636
@Retention(RetentionPolicy.RUNTIME)
3737
@Documented
38-
@EndpointExtension(filter = CloudFoundryEndpointFilter.class,
39-
endpoint = HealthEndpoint.class)
38+
@EndpointExtension(filter = CloudFoundryEndpointFilter.class, endpoint = HealthEndpoint.class)
4039
public @interface HealthEndpointCloudFoundryExtension {
4140

4241
}

0 commit comments

Comments
 (0)