Skip to content

Commit 555827c

Browse files
committed
Polish
1 parent d64cc08 commit 555827c

File tree

14 files changed

+51
-45
lines changed

14 files changed

+51
-45
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 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.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 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.

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 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.

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2014 the original author or authors.
2+
* Copyright 2013-2015 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.

spring-boot-docs/src/main/asciidoc/appendix-executable-jar-format.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ Their purpose is to load resources (`.class` files etc.) from nested jar files o
142142
files in directories (as opposed to explicitly on the classpath). In the case of the
143143
`[Jar|War]Launcher` the nested paths are fixed (`+lib/*.jar+` and `+lib-provided/*.jar+` for
144144
the war case) so you just add extra jars in those locations if you want more. The
145-
`PropertiesLauncher` looks in `lib/` in your application archive by default, but you can add additional locations by
146-
setting an environment variable `LOADER_PATH` or `loader.path` in `application.properties`
147-
(comma-separated list of directories or archives).
145+
`PropertiesLauncher` looks in `lib/` in your application archive by default, but you can
146+
add additional locations by setting an environment variable `LOADER_PATH` or `loader.path`
147+
in `application.properties` (comma-separated list of directories or archives).
148148

149149

150150

spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/MultiProjectRepackagingTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 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.
@@ -76,4 +76,5 @@ public void repackageWithRuntimeProjectDependency() throws Exception {
7676
assertThat(jarFile.getEntry("lib/projectB.jar"), notNullValue());
7777
jarFile.close();
7878
}
79+
7980
}

spring-boot-tools/spring-boot-loader/src/it/executable-props/src/main/java/org/springframework/launcher/it/props/EmbeddedJarStarter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2013 the original author or authors.
2+
* Copyright 2012-2015 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.
@@ -21,7 +21,7 @@
2121
/**
2222
* Main class to start the embedded server.
2323
*
24-
* @author Phillip Webb
24+
* @author Dave Syer
2525
*/
2626
public final class EmbeddedJarStarter {
2727

@@ -30,4 +30,5 @@ public static void main(String[] args) throws Exception {
3030
context.getBean(SpringConfiguration.class).run(args);
3131
context.close();
3232
}
33+
3334
}

spring-boot-tools/spring-boot-loader/src/it/executable-props/src/main/java/org/springframework/launcher/it/props/SpringConfiguration.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2013 the original author or authors.
2+
* Copyright 2012-2015 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.
@@ -27,19 +27,19 @@
2727
/**
2828
* Spring configuration.
2929
*
30-
* @author Phillip Webb
30+
* @author Dave Syer
3131
*/
3232
@Configuration
3333
@ComponentScan
3434
public class SpringConfiguration {
35-
35+
3636
private String message = "Jar";
37-
37+
3838
@PostConstruct
3939
public void init() throws IOException {
4040
String value = PropertiesLoaderUtils.loadAllProperties("application.properties").getProperty("message");
4141
if (value!=null) {
42-
this.message = value;
42+
this.message = value;
4343
}
4444

4545
}
@@ -48,6 +48,4 @@ public void run(String... args) {
4848
System.err.println("Hello Embedded " + this.message + "!");
4949
}
5050

51-
52-
5351
}

spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 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.
@@ -553,7 +553,7 @@ private void addNestedArchivesFromParent(List<Archive> urls) {
553553
urls.addAll(index + 1, extra);
554554
}
555555
}
556-
catch (Exception e) {
556+
catch (Exception ex) {
557557
// ignore
558558
}
559559
}

spring-boot/src/main/java/org/springframework/boot/context/web/ErrorPageFilter.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 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.
@@ -272,7 +272,7 @@ private static class ErrorWrapperResponse extends HttpServletResponseWrapper {
272272

273273
private String message;
274274

275-
private boolean errorToSend = false;
275+
private boolean hasErrorToSend = false;
276276

277277
public ErrorWrapperResponse(HttpServletResponse response) {
278278
super(response);
@@ -287,25 +287,23 @@ public void sendError(int status) throws IOException {
287287
public void sendError(int status, String message) throws IOException {
288288
this.status = status;
289289
this.message = message;
290-
this.errorToSend = true;
290+
this.hasErrorToSend = true;
291291
// Do not call super because the container may prevent us from handling the
292292
// error ourselves
293293
}
294294

295295
@Override
296296
public int getStatus() {
297-
if (this.errorToSend) {
297+
if (this.hasErrorToSend) {
298298
return this.status;
299299
}
300-
else {
301-
// If there was no error we need to trust the wrapped response
302-
return super.getStatus();
303-
}
300+
// If there was no error we need to trust the wrapped response
301+
return super.getStatus();
304302
}
305303

306304
@Override
307305
public void flushBuffer() throws IOException {
308-
if (this.errorToSend && !isCommitted()) {
306+
if (this.hasErrorToSend && !isCommitted()) {
309307
((HttpServletResponse) getResponse())
310308
.sendError(this.status, this.message);
311309
}

0 commit comments

Comments
 (0)