Skip to content

Commit 6ab376e

Browse files
committed
Reformat code use Eclipse Mars
1 parent ba7c1fd commit 6ab376e

File tree

652 files changed

+4150
-3918
lines changed

Some content is hidden

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

652 files changed

+4150
-3918
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ public Map<String, Object> getData() {
135135

136136
@Override
137137
public String toString() {
138-
return "AuditEvent [timestamp=" + this.timestamp + ", principal="
139-
+ this.principal + ", type=" + this.type + ", data=" + this.data + "]";
138+
return "AuditEvent [timestamp=" + this.timestamp + ", principal=" + this.principal
139+
+ ", type=" + this.type + ", data=" + this.data + "]";
140140
}
141141

142142
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ 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, Map<String, Object> data) {
43+
public AuditApplicationEvent(String principal, String type,
44+
Map<String, Object> data) {
4445
this(new AuditEvent(principal, type, data));
4546
}
4647

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

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@
104104
* infrastructure add beans of type {@link CrshShellProperties} to the application
105105
* context.
106106
* <p>
107-
* Additional shell commands can be implemented using the guide and documentation at <a
108-
* href="http://www.crashub.org">crashub.org</a>. By default Boot will search for commands
109-
* using the following classpath scanning pattern <code>classpath*:/commands/**</code>. To
110-
* add different locations or override the default use
111-
* <code>shell.command_path_patterns</code> in your application configuration.
107+
* Additional shell commands can be implemented using the guide and documentation at
108+
* <a href="http://www.crashub.org">crashub.org</a>. By default Boot will search for
109+
* commands using the following classpath scanning pattern
110+
* <code>classpath*:/commands/**</code>. To add different locations or override the
111+
* default use <code>shell.command_path_patterns</code> in your application configuration.
112112
*
113113
* @author Christian Dupuis
114114
* @see ShellProperties
@@ -180,8 +180,8 @@ public CrshShellAuthenticationProperties springAuthenticationProperties() {
180180
// ConfigurationProperties.
181181
SpringAuthenticationProperties authenticationProperties = new SpringAuthenticationProperties();
182182
if (this.management != null) {
183-
authenticationProperties.setRoles(new String[] { this.management
184-
.getSecurity().getRole() });
183+
authenticationProperties.setRoles(
184+
new String[] { this.management.getSecurity().getRole() });
185185
}
186186
return authenticationProperties;
187187
}
@@ -240,8 +240,8 @@ protected FS createFileSystem(String[] pathPatterns, String[] filterPatterns) {
240240
pathPattern, this.resourceLoader, filterPatterns)));
241241
}
242242
catch (IOException ex) {
243-
throw new IllegalStateException("Failed to mount file system for '"
244-
+ pathPattern + "'", ex);
243+
throw new IllegalStateException(
244+
"Failed to mount file system for '" + pathPattern + "'", ex);
245245
}
246246
}
247247
return fileSystem;
@@ -273,9 +273,9 @@ protected Map<String, Object> createPluginContextAttributes() {
273273
private static class AuthenticationManagerAdapter extends
274274
CRaSHPlugin<AuthenticationPlugin> implements AuthenticationPlugin<String> {
275275

276-
private static final PropertyDescriptor<String> ROLES = PropertyDescriptor
277-
.create("auth.spring.roles", "ADMIN",
278-
"Comma separated list of roles required to access the shell");
276+
private static final PropertyDescriptor<String> ROLES = PropertyDescriptor.create(
277+
"auth.spring.roles", "ADMIN",
278+
"Comma separated list of roles required to access the shell");
279279

280280
@Autowired
281281
private AuthenticationManager authenticationManager;
@@ -347,16 +347,16 @@ protected Iterable<PropertyDescriptor<?>> createConfigurationCapabilities() {
347347
* {@link ServiceLoaderDiscovery} to expose {@link CRaSHPlugin} Beans from Spring and
348348
* deal with filtering disabled plugins.
349349
*/
350-
private static class BeanFactoryFilteringPluginDiscovery extends
351-
ServiceLoaderDiscovery {
350+
private static class BeanFactoryFilteringPluginDiscovery
351+
extends ServiceLoaderDiscovery {
352352

353353
private final ListableBeanFactory beanFactory;
354354

355355
private final String[] disabledPlugins;
356356

357357
public BeanFactoryFilteringPluginDiscovery(ClassLoader classLoader,
358358
ListableBeanFactory beanFactory, String[] disabledPlugins)
359-
throws NullPointerException {
359+
throws NullPointerException {
360360
super(classLoader);
361361
this.beanFactory = beanFactory;
362362
this.disabledPlugins = disabledPlugins;
@@ -373,8 +373,8 @@ public Iterable<CRaSHPlugin<?>> getPlugins() {
373373
}
374374
}
375375

376-
Collection<CRaSHPlugin> pluginBeans = this.beanFactory.getBeansOfType(
377-
CRaSHPlugin.class).values();
376+
Collection<CRaSHPlugin> pluginBeans = this.beanFactory
377+
.getBeansOfType(CRaSHPlugin.class).values();
378378
for (CRaSHPlugin<?> pluginBean : pluginBeans) {
379379
if (isEnabled(pluginBean)) {
380380
plugins.add(pluginBean);
@@ -405,8 +405,8 @@ protected boolean isEnabled(CRaSHPlugin<?> plugin) {
405405
private boolean isEnabled(Class<?> pluginClass) {
406406
for (String disabledPlugin : this.disabledPlugins) {
407407
if (ClassUtils.getShortName(pluginClass).equalsIgnoreCase(disabledPlugin)
408-
|| ClassUtils.getQualifiedName(pluginClass).equalsIgnoreCase(
409-
disabledPlugin)) {
408+
|| ClassUtils.getQualifiedName(pluginClass)
409+
.equalsIgnoreCase(disabledPlugin)) {
410410
return false;
411411
}
412412
}
@@ -507,7 +507,8 @@ public List<ResourceHandle> members() throws IOException {
507507
Resource[] resources = this.resourceLoader.getResources(getName());
508508
List<ResourceHandle> files = new ArrayList<ResourceHandle>();
509509
for (Resource resource : resources) {
510-
if (!resource.getURL().getPath().endsWith("/") && !shouldFilter(resource)) {
510+
if (!resource.getURL().getPath().endsWith("/")
511+
&& !shouldFilter(resource)) {
511512
files.add(new FileHandle(resource.getFilename(), resource));
512513
}
513514
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ public static class Commit {
234234
private String time;
235235

236236
public String getId() {
237-
return this.id == null ? "" : (this.id.length() > 7 ? this.id.substring(
238-
0, 7) : this.id);
237+
return this.id == null ? ""
238+
: (this.id.length() > 7 ? this.id.substring(0, 7) : this.id);
239239
}
240240

241241
public void setId(String id) {

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ static class JmxCondition extends SpringBootCondition {
7474
@Override
7575
public ConditionOutcome getMatchOutcome(ConditionContext context,
7676
AnnotatedTypeMetadata metadata) {
77-
String endpointEnabled = context.getEnvironment().getProperty(
78-
"endpoints.jmx.enabled", "true");
79-
String jmxEnabled = context.getEnvironment().getProperty(
80-
"spring.jmx.enabled", "true");
81-
return new ConditionOutcome("true".equalsIgnoreCase(endpointEnabled)
82-
&& "true".equalsIgnoreCase(jmxEnabled),
77+
String endpointEnabled = context.getEnvironment()
78+
.getProperty("endpoints.jmx.enabled", "true");
79+
String jmxEnabled = context.getEnvironment().getProperty("spring.jmx.enabled",
80+
"true");
81+
return new ConditionOutcome(
82+
"true".equalsIgnoreCase(endpointEnabled)
83+
&& "true".equalsIgnoreCase(jmxEnabled),
8384
"JMX endpoint and JMX enabled");
8485

8586
}

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

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494
EmbeddedServletContainerAutoConfiguration.class, WebMvcAutoConfiguration.class,
9595
ManagementServerPropertiesAutoConfiguration.class })
9696
@EnableConfigurationProperties(HealthMvcEndpointProperties.class)
97-
public class EndpointWebMvcAutoConfiguration implements ApplicationContextAware,
98-
SmartInitializingSingleton {
97+
public class EndpointWebMvcAutoConfiguration
98+
implements ApplicationContextAware, SmartInitializingSingleton {
9999

100100
private static Log logger = LogFactory.getLog(EndpointWebMvcAutoConfiguration.class);
101101

@@ -119,9 +119,10 @@ public void setApplicationContext(ApplicationContext applicationContext)
119119
@Bean
120120
@ConditionalOnMissingBean
121121
public EndpointHandlerMapping endpointHandlerMapping() {
122-
EndpointHandlerMapping mapping = new EndpointHandlerMapping(mvcEndpoints()
123-
.getEndpoints());
124-
boolean disabled = ManagementServerPort.get(this.applicationContext) != ManagementServerPort.SAME;
122+
EndpointHandlerMapping mapping = new EndpointHandlerMapping(
123+
mvcEndpoints().getEndpoints());
124+
boolean disabled = ManagementServerPort
125+
.get(this.applicationContext) != ManagementServerPort.SAME;
125126
mapping.setDisabled(disabled);
126127
if (!disabled) {
127128
mapping.setPrefix(this.managementServerProperties.getContextPath());
@@ -144,10 +145,10 @@ public void afterSingletonsInstantiated() {
144145
.getEmbeddedServletContainer() != null) {
145146
createChildManagementContext();
146147
}
147-
if (managementPort == ManagementServerPort.SAME
148-
&& this.applicationContext.getEnvironment() instanceof ConfigurableEnvironment) {
149-
addLocalManagementPortPropertyAlias((ConfigurableEnvironment) this.applicationContext
150-
.getEnvironment());
148+
if (managementPort == ManagementServerPort.SAME && this.applicationContext
149+
.getEnvironment() instanceof ConfigurableEnvironment) {
150+
addLocalManagementPortPropertyAlias(
151+
(ConfigurableEnvironment) this.applicationContext.getEnvironment());
151152
}
152153
}
153154

@@ -172,8 +173,8 @@ public HealthMvcEndpoint healthMvcEndpoint(HealthEndpoint delegate) {
172173
boolean secure = (security == null || security.isEnabled());
173174
HealthMvcEndpoint healthMvcEndpoint = new HealthMvcEndpoint(delegate, secure);
174175
if (this.healthMvcEndpointProperties.getMapping() != null) {
175-
healthMvcEndpoint.addStatusMapping(this.healthMvcEndpointProperties
176-
.getMapping());
176+
healthMvcEndpoint
177+
.addStatusMapping(this.healthMvcEndpointProperties.getMapping());
177178
}
178179
return healthMvcEndpoint;
179180
}
@@ -210,14 +211,16 @@ private void createChildManagementContext() {
210211
// Ensure close on the parent also closes the child
211212
if (this.applicationContext instanceof ConfigurableApplicationContext) {
212213
((ConfigurableApplicationContext) this.applicationContext)
213-
.addApplicationListener(new ApplicationListener<ContextClosedEvent>() {
214-
@Override
215-
public void onApplicationEvent(ContextClosedEvent event) {
216-
if (event.getApplicationContext() == EndpointWebMvcAutoConfiguration.this.applicationContext) {
217-
childContext.close();
218-
}
219-
}
220-
});
214+
.addApplicationListener(
215+
new ApplicationListener<ContextClosedEvent>() {
216+
@Override
217+
public void onApplicationEvent(ContextClosedEvent event) {
218+
if (event
219+
.getApplicationContext() == EndpointWebMvcAutoConfiguration.this.applicationContext) {
220+
childContext.close();
221+
}
222+
}
223+
});
221224
}
222225
try {
223226
childContext.refresh();
@@ -227,7 +230,8 @@ public void onApplicationEvent(ContextClosedEvent event) {
227230
// and this is the signature of that happening
228231
if (ex instanceof EmbeddedServletContainerException
229232
|| ex.getCause() instanceof EmbeddedServletContainerException) {
230-
logger.warn("Could not start embedded container (management endpoints are still available through JMX)");
233+
logger.warn(
234+
"Could not start embedded container (management endpoints are still available through JMX)");
231235
}
232236
else {
233237
throw ex;
@@ -242,8 +246,8 @@ public void onApplicationEvent(ContextClosedEvent event) {
242246
*/
243247
private void addLocalManagementPortPropertyAlias(
244248
final ConfigurableEnvironment environment) {
245-
environment.getPropertySources().addLast(
246-
new PropertySource<Object>("Management Server") {
249+
environment.getPropertySources()
250+
.addLast(new PropertySource<Object>("Management Server") {
247251
@Override
248252
public Object getProperty(String name) {
249253
if ("local.management.port".equals(name)) {
@@ -283,7 +287,7 @@ public ApplicationContextHeaderFilter(ApplicationContext applicationContext) {
283287
@Override
284288
protected void doFilterInternal(HttpServletRequest request,
285289
HttpServletResponse response, FilterChain filterChain)
286-
throws ServletException, IOException {
290+
throws ServletException, IOException {
287291
if (this.properties == null) {
288292
this.properties = this.applicationContext
289293
.getBean(ManagementServerProperties.class);
@@ -328,7 +332,7 @@ public static ManagementServerPort get(BeanFactory beanFactory) {
328332
return ((port == null)
329333
|| (serverProperties.getPort() == null && port.equals(8080))
330334
|| (port != 0 && port.equals(serverProperties.getPort())) ? SAME
331-
: DIFFERENT);
335+
: DIFFERENT);
332336
}
333337

334338
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public class EndpointWebMvcChildContextConfiguration {
7979
private List<EndpointHandlerMappingCustomizer> mappingCustomizers;
8080

8181
@Configuration
82-
protected static class ServerCustomization implements
83-
EmbeddedServletContainerCustomizer, Ordered {
82+
protected static class ServerCustomization
83+
implements EmbeddedServletContainerCustomizer, Ordered {
8484

8585
@Value("${error.path:/error}")
8686
private String errorPath = "/error";
@@ -198,8 +198,8 @@ protected void postProcessMapping(ListableBeanFactory beanFactory,
198198
*/
199199
@Configuration
200200
@ConditionalOnClass(WebSecurityConfigurerAdapter.class)
201-
protected static class SecureEndpointHandlerMappingConfiguration extends
202-
EndpointHandlerMappingConfiguration {
201+
protected static class SecureEndpointHandlerMappingConfiguration
202+
extends EndpointHandlerMappingConfiguration {
203203

204204
@Override
205205
protected void postProcessMapping(ListableBeanFactory beanFactory,

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

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,16 @@ public static class MongoHealthIndicatorConfiguration {
158158
@ConditionalOnMissingBean(name = "mongoHealthIndicator")
159159
public HealthIndicator mongoHealthIndicator() {
160160
if (this.mongoTemplates.size() == 1) {
161-
return new MongoHealthIndicator(this.mongoTemplates.values().iterator()
162-
.next());
161+
return new MongoHealthIndicator(
162+
this.mongoTemplates.values().iterator().next());
163163
}
164164

165165
CompositeHealthIndicator composite = new CompositeHealthIndicator(
166166
this.healthAggregator);
167-
for (Map.Entry<String, MongoTemplate> entry : this.mongoTemplates.entrySet()) {
168-
composite.addHealthIndicator(entry.getKey(), new MongoHealthIndicator(
169-
entry.getValue()));
167+
for (Map.Entry<String, MongoTemplate> entry : this.mongoTemplates
168+
.entrySet()) {
169+
composite.addHealthIndicator(entry.getKey(),
170+
new MongoHealthIndicator(entry.getValue()));
170171
}
171172
return composite;
172173
}
@@ -187,16 +188,16 @@ public static class RedisHealthIndicatorConfiguration {
187188
@ConditionalOnMissingBean(name = "redisHealthIndicator")
188189
public HealthIndicator redisHealthIndicator() {
189190
if (this.redisConnectionFactories.size() == 1) {
190-
return new RedisHealthIndicator(this.redisConnectionFactories.values()
191-
.iterator().next());
191+
return new RedisHealthIndicator(
192+
this.redisConnectionFactories.values().iterator().next());
192193
}
193194

194195
CompositeHealthIndicator composite = new CompositeHealthIndicator(
195196
this.healthAggregator);
196197
for (Map.Entry<String, RedisConnectionFactory> entry : this.redisConnectionFactories
197198
.entrySet()) {
198-
composite.addHealthIndicator(entry.getKey(), new RedisHealthIndicator(
199-
entry.getValue()));
199+
composite.addHealthIndicator(entry.getKey(),
200+
new RedisHealthIndicator(entry.getValue()));
200201
}
201202
return composite;
202203
}
@@ -217,16 +218,16 @@ public static class RabbitHealthIndicatorConfiguration {
217218
@ConditionalOnMissingBean(name = "rabbitHealthIndicator")
218219
public HealthIndicator rabbitHealthIndicator() {
219220
if (this.rabbitTemplates.size() == 1) {
220-
return new RabbitHealthIndicator(this.rabbitTemplates.values().iterator()
221-
.next());
221+
return new RabbitHealthIndicator(
222+
this.rabbitTemplates.values().iterator().next());
222223
}
223224

224225
CompositeHealthIndicator composite = new CompositeHealthIndicator(
225226
this.healthAggregator);
226227
for (Map.Entry<String, RabbitTemplate> entry : this.rabbitTemplates
227228
.entrySet()) {
228-
composite.addHealthIndicator(entry.getKey(), new RabbitHealthIndicator(
229-
entry.getValue()));
229+
composite.addHealthIndicator(entry.getKey(),
230+
new RabbitHealthIndicator(entry.getValue()));
230231
}
231232
return composite;
232233
}
@@ -247,15 +248,15 @@ public static class SolrHealthIndicatorConfiguration {
247248
@ConditionalOnMissingBean(name = "solrHealthIndicator")
248249
public HealthIndicator solrHealthIndicator() {
249250
if (this.solrServers.size() == 1) {
250-
return new SolrHealthIndicator(this.solrServers.entrySet().iterator()
251-
.next().getValue());
251+
return new SolrHealthIndicator(
252+
this.solrServers.entrySet().iterator().next().getValue());
252253
}
253254

254255
CompositeHealthIndicator composite = new CompositeHealthIndicator(
255256
this.healthAggregator);
256257
for (Map.Entry<String, SolrServer> entry : this.solrServers.entrySet()) {
257-
composite.addHealthIndicator(entry.getKey(), new SolrHealthIndicator(
258-
entry.getValue()));
258+
composite.addHealthIndicator(entry.getKey(),
259+
new SolrHealthIndicator(entry.getValue()));
259260
}
260261
return composite;
261262
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
*
4545
* <p>
4646
* Additional configuration parameters for Jolokia can be provided by specifying
47-
* <code>jolokia.config.*</code> properties. See the <a
48-
* href="http://jolokia.org">http://jolokia.org</a> web site for more information on
47+
* <code>jolokia.config.*</code> properties. See the
48+
* <a href="http://jolokia.org">http://jolokia.org</a> web site for more information on
4949
* supported configuration parameters.
5050
*
5151
* @author Christian Dupuis

0 commit comments

Comments
 (0)