Skip to content

Commit 4599032

Browse files
committed
Fixing checkstyle errors
1 parent 5ce82e4 commit 4599032

File tree

11 files changed

+32
-32
lines changed

11 files changed

+32
-32
lines changed

spring-cloud-function-adapters/spring-cloud-function-serverless-web/src/main/java/org/springframework/cloud/function/serverless/web/ServerlessHttpServletResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ public String getErrorMessage() {
421421
* Inner class that adapts the ServletOutputStream to mark the response as
422422
* committed once the buffer size is exceeded.
423423
*/
424-
private class ResponseServletOutputStream extends ServletOutputStream {
424+
private final class ResponseServletOutputStream extends ServletOutputStream {
425425

426426
private WriteListener listener;
427427

spring-cloud-function-adapters/spring-cloud-function-serverless-web/src/main/java/org/springframework/cloud/function/serverless/web/ServerlessWebApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public void printBanner(Environment environment, Class<?> sourceClass, PrintStre
327327
}
328328
}
329329

330-
private static class SpringAwsBanner implements Banner {
330+
private static final class SpringAwsBanner implements Banner {
331331

332332
private static final String[] BANNER = { "", "\n"
333333
+ " ____ _ _____ ______ _ _ _ \n"

spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/MessageRoutingCallbackTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public void before() {
4848
@SuppressWarnings("unchecked")
4949
@Test
5050
public void testRoutingCallbackWithMessageModification() {
51-
FunctionCatalog catalog = this.configureCatalog(SamppleConfiguration.class);
52-
SamppleConfiguration conf = context.getBean(SamppleConfiguration.class);
51+
FunctionCatalog catalog = this.configureCatalog(SampleConfiguration.class);
52+
SampleConfiguration conf = context.getBean(SampleConfiguration.class);
5353
FunctionInvocationWrapper function = (FunctionInvocationWrapper) catalog.lookup(RoutingFunction.FUNCTION_NAME, "application/json");
5454
String foo = "{\"foo\":\"blah\"}";
5555
Message<byte[]> fooResult = (Message<byte[]>) function.apply(MessageBuilder.withPayload(foo.getBytes()).build());
@@ -71,7 +71,7 @@ private FunctionCatalog configureCatalog(Class<?>... configClass) {
7171
}
7272

7373
@EnableAutoConfiguration
74-
private static class SamppleConfiguration {
74+
private static final class SampleConfiguration {
7575

7676
Map<String, UUID> createdMessageIds = new HashMap<>();
7777

spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistryTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ public Serializable blah() {
13441344
return new Foo();
13451345
}
13461346

1347-
private static class Foo implements Supplier<Object>, Serializable {
1347+
private static final class Foo implements Supplier<Object>, Serializable {
13481348

13491349
@Override
13501350
public Object get() {
@@ -1363,7 +1363,7 @@ public Serializable blah() {
13631363
return new Foo();
13641364
}
13651365

1366-
private static class Foo implements Function<Object, Object>, Serializable {
1366+
private static final class Foo implements Function<Object, Object>, Serializable {
13671367

13681368
@Override
13691369
public Object apply(Object t) {
@@ -1497,7 +1497,7 @@ public Function<Event<String, Product>, String> function() {
14971497
}
14981498
}
14991499

1500-
private static class Product {
1500+
private static final class Product {
15011501
private String name;
15021502

15031503
public String getName() {
@@ -1509,7 +1509,7 @@ public void setName(String name) {
15091509
}
15101510
}
15111511

1512-
private static class Event<K, V> {
1512+
private static final class Event<K, V> {
15131513

15141514
private K key;
15151515

spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwarePojoFunctionRegistryTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public Function<String, String> func() {
170170
}
171171

172172
// POJO Function that implements Function
173-
private static class MyFunction implements Function<String, String> {
173+
private static final class MyFunction implements Function<String, String> {
174174
public String uppercase(String value) {
175175
return value.toUpperCase(Locale.ROOT);
176176
}
@@ -182,7 +182,7 @@ public String apply(String t) {
182182
}
183183

184184
// POJO Function
185-
public static class MyFunctionLike {
185+
public static final class MyFunctionLike {
186186
public String uppercase(String value) {
187187
return value.toUpperCase(Locale.ROOT);
188188
}

spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/catalog/SimpleFunctionRegistryTests.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ private FunctionCatalog configureCatalog(Class<?>... configClass) {
697697
}
698698

699699
@EnableAutoConfiguration
700-
private static class CustomConverterConfiguration {
700+
private static final class CustomConverterConfiguration {
701701
@Bean
702702
public MessageConverter stringToPersonConverter() {
703703
return new AbstractMessageConverter(MimeType.valueOf("text/person")) {
@@ -738,7 +738,7 @@ public Function<Person, String> func() {
738738
}
739739
}
740740

741-
public static class Person {
741+
public static final class Person {
742742
private String name;
743743

744744
public String getName() {
@@ -755,7 +755,7 @@ public String toString() {
755755
}
756756
}
757757

758-
private static class Words implements Supplier<String> {
758+
private static final class Words implements Supplier<String> {
759759

760760
@Override
761761
public String get() {
@@ -764,7 +764,7 @@ public String get() {
764764

765765
}
766766

767-
private static class UpperCase implements Function<String, String> {
767+
private static final class UpperCase implements Function<String, String> {
768768

769769
@Override
770770
public String apply(String t) {
@@ -773,7 +773,7 @@ public String apply(String t) {
773773

774774
}
775775

776-
private static class Echo implements Function<Object, Object> {
776+
private static final class Echo implements Function<Object, Object> {
777777

778778
@Override
779779
public Object apply(Object t) {
@@ -782,7 +782,7 @@ public Object apply(Object t) {
782782

783783
}
784784

785-
private static class UpperCaseMessage
785+
private static final class UpperCaseMessage
786786
implements Function<Message<String>, Message<String>> {
787787

788788
@Override
@@ -793,7 +793,7 @@ public Message<String> apply(Message<String> t) {
793793

794794
}
795795

796-
private static class Reverse implements Function<String, String> {
796+
private static final class Reverse implements Function<String, String> {
797797

798798
@Override
799799
public String apply(String t) {
@@ -802,7 +802,7 @@ public String apply(String t) {
802802

803803
}
804804

805-
private static class ReverseMessage
805+
private static final class ReverseMessage
806806
implements Function<Message<String>, Message<String>> {
807807

808808
@Override
@@ -814,7 +814,7 @@ public Message<String> apply(Message<String> t) {
814814

815815
}
816816

817-
private static class TestFunction implements Function<Integer, String> {
817+
private static final class TestFunction implements Function<Integer, String> {
818818

819819
@Override
820820
public String apply(Integer t) {
@@ -823,7 +823,7 @@ public String apply(Integer t) {
823823

824824
}
825825

826-
private static class ReactiveFunction implements Function<Flux<Message<List<Person>>>, Flux<List<String>>> {
826+
private static final class ReactiveFunction implements Function<Flux<Message<List<Person>>>, Flux<List<String>>> {
827827

828828
@Override
829829
public Flux<List<String>> apply(Flux<Message<List<Person>>> listFlux) {
@@ -833,7 +833,7 @@ public Flux<List<String>> apply(Flux<Message<List<Person>>> listFlux) {
833833
}
834834
}
835835

836-
private static class ReactiveMonoGreeter implements Supplier<Mono<Message<String>>> {
836+
private static final class ReactiveMonoGreeter implements Supplier<Mono<Message<String>>> {
837837

838838
@Override
839839
public Mono<Message<String>> get() {
@@ -842,7 +842,7 @@ public Mono<Message<String>> get() {
842842

843843
}
844844

845-
private static class HeaderEnricherFunction implements Function<Message<?>, Message<?>> {
845+
private static final class HeaderEnricherFunction implements Function<Message<?>, Message<?>> {
846846

847847
@Override
848848
public Message<?> apply(Message<?> message) {
@@ -851,28 +851,28 @@ public Message<?> apply(Message<?> message) {
851851
}
852852
}
853853

854-
private static class StringArrayFunction implements Function<String[], String> {
854+
private static final class StringArrayFunction implements Function<String[], String> {
855855
@Override
856856
public String apply(String[] t) {
857857
return Arrays.asList(t).toString();
858858
}
859859
}
860860

861-
private static class StringListFunction implements Function<List<String>, String> {
861+
private static final class StringListFunction implements Function<List<String>, String> {
862862
@Override
863863
public String apply(List<String> t) {
864864
return t.toString();
865865
}
866866
}
867867

868-
private static class TypelessFunction implements Function<Object, String> {
868+
private static final class TypelessFunction implements Function<Object, String> {
869869
@Override
870870
public String apply(Object t) {
871871
return t.toString();
872872
}
873873
}
874874

875-
private static class ByteArrayFunction implements Function<byte[], String> {
875+
private static final class ByteArrayFunction implements Function<byte[], String> {
876876
@Override
877877
public String apply(byte[] t) {
878878
return new String(t);

spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ public Function<String, String> function() {
848848
//
849849
// }
850850

851-
private static class FunctionFactoryBean
851+
private static final class FunctionFactoryBean
852852
extends AbstractFactoryBean<Function<String, String>> {
853853

854854
@Override

spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/config/ContextFunctionCatalogInitializerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ public void setValue(String value) {
414414

415415
}
416416

417-
private static class Person {
417+
private static final class Person {
418418
private String name;
419419

420420
public String getName() {

spring-cloud-function-web/src/main/java/org/springframework/cloud/function/web/function/FunctionEndpointInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private DefaultErrorWebExceptionHandler errorHandler(GenericApplicationContext c
133133
return handler;
134134
}
135135

136-
private static class RouterFunctionRegister {
136+
private static final class RouterFunctionRegister {
137137

138138
private static void register(GenericApplicationContext context) {
139139
context.registerBean(RouterFunction.class,

spring-cloud-function-web/src/test/java/org/springframework/cloud/function/web/flux/HeadersToMessageTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public Function<Message<Employee>, Message<Employee>> function1() {
106106
}
107107

108108
@SuppressWarnings("unused") // used by json converter
109-
private static class Employee {
109+
private static final class Employee {
110110

111111
private String name;
112112

0 commit comments

Comments
 (0)