Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 2ca6059

Browse files
cppwfsilayaperumalg
authored andcommitted
Added AnnotationUseStyle to checkstyle config
updated code so that validation passes resolves #1408 Updated copyright
1 parent 845f1af commit 2ca6059

File tree

8 files changed

+32
-30
lines changed

8 files changed

+32
-30
lines changed

spring-cloud-dataflow-rest-client/src/main/java/org/springframework/cloud/dataflow/rest/client/support/StepExecutionHistoryJacksonMixIn.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 the original author or authors.
2+
* Copyright 2016-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.
@@ -31,7 +31,7 @@
3131
@JsonIgnoreProperties({ "count", "durationPerRead" })
3232
public abstract class StepExecutionHistoryJacksonMixIn {
3333

34-
@JsonCreator()
34+
@JsonCreator
3535
StepExecutionHistoryJacksonMixIn(@JsonProperty("stepName") String stepName) {
3636
}
3737

spring-cloud-dataflow-rest-client/src/main/java/org/springframework/cloud/dataflow/rest/client/support/StepExecutionJacksonMixIn.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 the original author or authors.
2+
* Copyright 2016-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.
@@ -31,7 +31,7 @@
3131
@JsonIgnoreProperties({ "jobParameters", "jobExecutionId", "skipCount", "summary" })
3232
public abstract class StepExecutionJacksonMixIn {
3333

34-
@JsonCreator()
34+
@JsonCreator
3535
StepExecutionJacksonMixIn(@JsonProperty("stepName") String stepName) {
3636
}
3737

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/CompletionController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2016 the original author or authors.
2+
* Copyright 2015-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.
@@ -72,7 +72,7 @@ public CompletionController(StreamCompletionProvider completionProvider,
7272
* 1. Higher values request more detail, with values typically in the range [1..5]
7373
* @return the list of completion proposals
7474
*/
75-
@RequestMapping(value = "/stream")
75+
@RequestMapping("/stream")
7676
public CompletionProposalsResource completions(@RequestParam("start") String start,
7777
@RequestParam(value = "detailLevel", defaultValue = "1") @Min(value = 1, message = "The provided detail level must be greater than zero.") int detailLevel) {
7878
return assembler.toResource(completionProvider.complete(start, detailLevel));
@@ -87,7 +87,7 @@ public CompletionProposalsResource completions(@RequestParam("start") String sta
8787
* 1. Higher values request more detail, with values typically in the range [1..5]
8888
* @return the list of completion proposals
8989
*/
90-
@RequestMapping(value = "/task")
90+
@RequestMapping("/task")
9191
public CompletionProposalsResource taskCompletions(@RequestParam("start") String start,
9292
@RequestParam(value = "detailLevel", defaultValue = "1") @Min(value = 1, message = "The provided detail level must be greater than zero.") int detailLevel) {
9393
return assembler.toResource(taskCompletionProvider.complete(start, detailLevel));

spring-cloud-starter-dataflow-server-local/src/test/java/org/springframework/cloud/dataflow/server/local/metrics/FakeMetricsCollector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017 the original author or authors.
2+
* Copyright 2017-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.
@@ -68,7 +68,7 @@ public class FakeMetricsCollector {
6868

6969
private static final Log LOGGER = LogFactory.getLog(FakeMetricsCollector.class);
7070

71-
@Value(value = "classpath:/org/springframework/cloud/dataflow/server/local/metrics/metrics-collector-sample-response.json")
71+
@Value("classpath:/org/springframework/cloud/dataflow/server/local/metrics/metrics-collector-sample-response.json")
7272
private Resource metricsCollectorResponseResource;
7373

7474
public static void main(String[] args) {

spring-cloud-starter-dataflow-server-local/src/test/java/org/springframework/cloud/dataflow/server/local/security/LocalServerSecurityWithSingleUserTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2017 the original author or authors.
2+
* Copyright 2016-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.
@@ -68,19 +68,19 @@ public class LocalServerSecurityWithSingleUserTests {
6868

6969
private static UserCredentials singleUser = new UserCredentials("user", "password");
7070

71-
@Parameter(value = 0)
71+
@Parameter(0)
7272
public HttpMethod httpMethod;
7373

74-
@Parameter(value = 1)
74+
@Parameter(1)
7575
public HttpStatus expectedHttpStatus;
7676

77-
@Parameter(value = 2)
77+
@Parameter(2)
7878
public String url;
7979

80-
@Parameter(value = 3)
80+
@Parameter(3)
8181
public UserCredentials userCredentials;
8282

83-
@Parameter(value = 4)
83+
@Parameter(4)
8484
public Map<String, String> urlParameters;
8585

8686
@Parameters(name = "Authentication Test {index} - {0} {2} - Returns: {1}")

spring-cloud-starter-dataflow-server-local/src/test/java/org/springframework/cloud/dataflow/server/local/security/LocalServerSecurityWithUsersFileTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2017 the original author or authors.
2+
* Copyright 2016-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.
@@ -71,19 +71,19 @@ public class LocalServerSecurityWithUsersFileTests {
7171

7272
private static UserCredentials createOnlyUser = new UserCredentials("cartman", "cartmanpwd");
7373

74-
@Parameter(value = 0)
74+
@Parameter(0)
7575
public HttpMethod httpMethod;
7676

77-
@Parameter(value = 1)
77+
@Parameter(1)
7878
public HttpStatus expectedHttpStatus;
7979

80-
@Parameter(value = 2)
80+
@Parameter(2)
8181
public String url;
8282

83-
@Parameter(value = 3)
83+
@Parameter(3)
8484
public UserCredentials userCredentials;
8585

86-
@Parameter(value = 4)
86+
@Parameter(4)
8787
public Map<String, String> urlParameters;
8888

8989
@Parameters(name = "Authentication Test {index} - {0} {2} - Returns: {1}")

spring-cloud-starter-dataflow-server-local/src/test/java/org/springframework/cloud/dataflow/server/local/security/LocalServerSecurityWithUsersFileTestsWithoutTasks.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017 the original author or authors.
2+
* Copyright 2017-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.
@@ -73,19 +73,19 @@ public class LocalServerSecurityWithUsersFileTestsWithoutTasks {
7373

7474
private static UserCredentials createOnlyUser = new UserCredentials("cartman", "cartmanpwd");
7575

76-
@Parameter(value = 0)
76+
@Parameter(0)
7777
public HttpMethod httpMethod;
7878

79-
@Parameter(value = 1)
79+
@Parameter(1)
8080
public HttpStatus expectedHttpStatus;
8181

82-
@Parameter(value = 2)
82+
@Parameter(2)
8383
public String url;
8484

85-
@Parameter(value = 3)
85+
@Parameter(3)
8686
public UserCredentials userCredentials;
8787

88-
@Parameter(value = 4)
88+
@Parameter(4)
8989
public Map<String, String> urlParameters;
9090

9191
@Parameters(name = "Authentication Test {index} - {0} {2} - Returns: {1}")

src/checkstyle/checkstyle.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
<!--</module>-->
1919

2020
<!-- Annotations -->
21-
<!--<module name="AnnotationUseStyle">-->
22-
<!--<property name="elementStyle" value="compact"/>-->
23-
<!--</module>-->
21+
<module name="AnnotationUseStyle">
22+
<property name="elementStyle" value="compact"/>
23+
<property name="trailingArrayComma" value="never"/>
24+
<property name="closingParens" value="never"/>
25+
</module>
2426
<module name="MissingOverride"/>
2527
<module name="PackageAnnotation"/>
2628
<module name="AnnotationLocation">

0 commit comments

Comments
 (0)