Skip to content

Commit 8f1be4c

Browse files
committed
Upgrade to spring-javaformat 0.0.11
1 parent d548c5e commit 8f1be4c

File tree

1,940 files changed

+16809
-28493
lines changed

Some content is hidden

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

1,940 files changed

+16809
-28493
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/AuditEvent.java

Lines changed: 4 additions & 5 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.
@@ -82,8 +82,7 @@ public AuditEvent(String principal, String type, String... data) {
8282
* @param type the event type
8383
* @param data the event data
8484
*/
85-
public AuditEvent(Date timestamp, String principal, String type,
86-
Map<String, Object> data) {
85+
public AuditEvent(Date timestamp, String principal, String type, Map<String, Object> data) {
8786
Assert.notNull(timestamp, "Timestamp must not be null");
8887
Assert.notNull(type, "Type must not be null");
8988
this.timestamp = timestamp;
@@ -142,8 +141,8 @@ public Map<String, Object> getData() {
142141

143142
@Override
144143
public String toString() {
145-
return "AuditEvent [timestamp=" + this.timestamp + ", principal=" + this.principal
146-
+ ", type=" + this.type + ", data=" + this.data + "]";
144+
return "AuditEvent [timestamp=" + this.timestamp + ", principal=" + this.principal + ", type=" + this.type
145+
+ ", data=" + this.data + "]";
147146
}
148147

149148
}

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/listener/AbstractAuditListener.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 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.
@@ -25,8 +25,7 @@
2525
* @author Vedran Pavic
2626
* @since 1.4.0
2727
*/
28-
public abstract class AbstractAuditListener
29-
implements ApplicationListener<AuditApplicationEvent> {
28+
public abstract class AbstractAuditListener implements ApplicationListener<AuditApplicationEvent> {
3029

3130
@Override
3231
public void onApplicationEvent(AuditApplicationEvent event) {

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/listener/AuditApplicationEvent.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 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,8 +40,7 @@ public class AuditApplicationEvent extends ApplicationEvent {
4040
* @param data the event data
4141
* @see AuditEvent#AuditEvent(String, String, Map)
4242
*/
43-
public AuditApplicationEvent(String principal, String type,
44-
Map<String, Object> data) {
43+
public AuditApplicationEvent(String principal, String type, Map<String, Object> data) {
4544
this(new AuditEvent(principal, type, data));
4645
}
4746

@@ -66,8 +65,7 @@ public AuditApplicationEvent(String principal, String type, String... data) {
6665
* @param data the event data
6766
* @see AuditEvent#AuditEvent(Date, String, String, Map)
6867
*/
69-
public AuditApplicationEvent(Date timestamp, String principal, String type,
70-
Map<String, Object> data) {
68+
public AuditApplicationEvent(Date timestamp, String principal, String type, Map<String, Object> data) {
7169
this(new AuditEvent(timestamp, principal, type, data));
7270
}
7371

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 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 @@
3232
* @author Dave Syer
3333
*/
3434
@Qualifier
35-
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE,
36-
ElementType.ANNOTATION_TYPE })
35+
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
3736
@Retention(RetentionPolicy.RUNTIME)
3837
@Inherited
3938
@Documented

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

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

4444
private final AuditEventRepository auditEventRepository;
4545

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

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

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

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

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 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.
@@ -152,8 +152,7 @@ static class NoOpCacheStatisticsConfiguration {
152152
public CacheStatisticsProvider<Cache> noOpCacheStatisticsProvider() {
153153
return new CacheStatisticsProvider<Cache>() {
154154
@Override
155-
public CacheStatistics getCacheStatistics(CacheManager cacheManager,
156-
Cache cache) {
155+
public CacheStatistics getCacheStatistics(CacheManager cacheManager, Cache cache) {
157156
if (cacheManager instanceof NoOpCacheManager) {
158157
return NO_OP_STATS;
159158
}

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 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.
@@ -42,28 +42,25 @@ protected HealthIndicator createHealthIndicator(Map<String, S> beans) {
4242
if (beans.size() == 1) {
4343
return createHealthIndicator(beans.values().iterator().next());
4444
}
45-
CompositeHealthIndicator composite = new CompositeHealthIndicator(
46-
this.healthAggregator);
45+
CompositeHealthIndicator composite = new CompositeHealthIndicator(this.healthAggregator);
4746
for (Map.Entry<String, S> entry : beans.entrySet()) {
48-
composite.addHealthIndicator(entry.getKey(),
49-
createHealthIndicator(entry.getValue()));
47+
composite.addHealthIndicator(entry.getKey(), createHealthIndicator(entry.getValue()));
5048
}
5149
return composite;
5250
}
5351

5452
@SuppressWarnings("unchecked")
5553
protected H createHealthIndicator(S source) {
56-
Class<?>[] generics = ResolvableType
57-
.forClass(CompositeHealthIndicatorConfiguration.class, getClass())
54+
Class<?>[] generics = ResolvableType.forClass(CompositeHealthIndicatorConfiguration.class, getClass())
5855
.resolveGenerics();
5956
Class<H> indicatorClass = (Class<H>) generics[0];
6057
Class<S> sourceClass = (Class<S>) generics[1];
6158
try {
6259
return indicatorClass.getConstructor(sourceClass).newInstance(source);
6360
}
6461
catch (Exception ex) {
65-
throw new IllegalStateException("Unable to create indicator " + indicatorClass
66-
+ " for source " + sourceClass, ex);
62+
throw new IllegalStateException(
63+
"Unable to create indicator " + indicatorClass + " for source " + sourceClass, ex);
6764
}
6865
}
6966

0 commit comments

Comments
 (0)