Skip to content

Commit e69296d

Browse files
committed
Fix checkstyle violations in samples
1 parent 4853477 commit e69296d

File tree

117 files changed

+453
-482
lines changed

Some content is hidden

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

117 files changed

+453
-482
lines changed

spring-boot-parent/src/checkstyle/checkstyle-suppressions.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<suppressions>
66
<suppress files="SpringApplicationTests\.java" checks="FinalClass" />
77
<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor" />
8-
<suppress files="LaunchScriptTestApplication\.java" checks="HideUtilityClassConstructor" />
9-
<suppress files="DevToolsTestApplication\.java" checks="HideUtilityClassConstructor" />
8+
<suppress files=".+Application\.java" checks="HideUtilityClassConstructor" />
109
<suppress files="SignalUtils\.java" checks="IllegalImport" />
1110
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]cli[\\/]command[\\/]" checks="ImportControl" />
1211
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]sample[\\/]" checks="ImportControl" />
@@ -23,4 +22,8 @@
2322
<suppress files="LogLevel\.java" checks="JavadocVariable" />
2423
<suppress files="HelpMojo\.java" checks=".*"/>
2524
<suppress files="[\\/]org.springframework.boot.configurationprocessor.json[\\/].*\.java$" checks=".*"/>
25+
<suppress files="TripType\.java" checks="JavadocVariable" />
26+
<suppress files="Rating\.java" checks="JavadocVariable" />
27+
<suppress files="Direction\.java" checks="JavadocVariable" />
28+
<suppress files="JooqExamples\.java" checks="AvoidStaticImport"/>
2629
</suppressions>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
endpoints.shutdown.enabled=true
2-
3-
management.security.enabled=false
2+
management.security.enabled=false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
health.diskspace.enabled=false
1+
health.diskspace.enabled=false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
endpoints.cors.allowed-origins=http://localhost:8080
2-
endpoints.cors.allowed-methods=GET
2+
endpoints.cors.allowed-methods=GET
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
server.error.path: /oops
22
management.context-path: /admin
3-
endpoints.health.sensitive: false
3+
endpoints.health.sensitive: false

spring-boot-samples/spring-boot-sample-ant/src/test/java/sample/ant/SampleAntApplicationIT.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616

1717
package sample.ant;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import java.io.File;
2220
import java.io.FileFilter;
2321
import java.io.InputStreamReader;
2422
import java.util.concurrent.TimeUnit;
2523

2624
import org.junit.Test;
25+
2726
import org.springframework.boot.loader.tools.JavaExecutable;
2827
import org.springframework.util.FileCopyUtils;
2928

29+
import static org.assertj.core.api.Assertions.assertThat;
30+
3031
/**
3132
* Integration Tests for {@code SampleAntApplication}.
3233
*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
name: Phil
1+
name: Phil
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
name: Phil
1+
name: Phil

spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/SampleAtmosphereApplication.java

Lines changed: 5 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-2018 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.
@@ -59,6 +59,10 @@ public ServletRegistrationBean atmosphereServlet() {
5959
return registration;
6060
}
6161

62+
public static void main(String[] args) throws Exception {
63+
SpringApplication.run(SampleAtmosphereApplication.class, args);
64+
}
65+
6266
@Configuration
6367
static class MvcConfiguration extends WebMvcConfigurerAdapter {
6468

@@ -79,8 +83,4 @@ public void onStartup(ServletContext servletContext) throws ServletException {
7983

8084
}
8185

82-
public static void main(String[] args) throws Exception {
83-
SpringApplication.run(SampleAtmosphereApplication.class, args);
84-
}
85-
8686
}

spring-boot-samples/spring-boot-sample-cache/src/main/java/sample/cache/SampleClient.java

Lines changed: 2 additions & 2 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-2018 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.
@@ -53,7 +53,7 @@ class SampleClient {
5353

5454
private final Random random;
5555

56-
public SampleClient(CountryRepository countryService) {
56+
SampleClient(CountryRepository countryService) {
5757
this.countryService = countryService;
5858
this.random = new Random();
5959
}

0 commit comments

Comments
 (0)