Skip to content

Commit 31b0e81

Browse files
committed
Add @FunctionalInterface to remaining public and protected interfaces
See gh-6857
1 parent 3d52c86 commit 31b0e81

File tree

21 files changed

+33
-20
lines changed

21 files changed

+33
-20
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HeapdumpMvcEndpoint.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ protected void handle(File heapDumpFile, HttpServletRequest request,
168168
/**
169169
* Strategy interface used to dump the heap to a file.
170170
*/
171+
@FunctionalInterface
171172
protected interface HeapDumper {
172173

173174
/**

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamePatternFilter.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-2017 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,7 +76,7 @@ private boolean isRegex(String name) {
7676
/**
7777
* Callback used to add a name.
7878
*/
79-
protected interface NameCallback {
79+
interface NameCallback {
8080

8181
void addName(String name);
8282

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/ReservoirFactory.java

Lines changed: 2 additions & 1 deletion
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-2017 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.
@@ -26,6 +26,7 @@
2626
* @author Phillip Webb
2727
* @since 1.5.0
2828
*/
29+
@FunctionalInterface
2930
public interface ReservoirFactory {
3031

3132
/**

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/util/SimpleInMemoryRepository.java

Lines changed: 2 additions & 1 deletion
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-2017 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.
@@ -102,6 +102,7 @@ protected NavigableMap<String, T> getValues() {
102102
*
103103
* @param <T> the value type
104104
*/
105+
@FunctionalInterface
105106
public interface Callback<T> {
106107

107108
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* @author Phillip Webb
4040
* @since 1.5.0
4141
*/
42+
@FunctionalInterface
4243
public interface AutoConfigurationImportFilter {
4344

4445
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* @author Phillip Webb
4242
* @since 1.5.0
4343
*/
44+
@FunctionalInterface
4445
public interface AutoConfigurationImportListener extends EventListener {
4546

4647
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/ClusterBuilderCustomizer.java

Lines changed: 2 additions & 1 deletion
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-2017 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,6 +27,7 @@
2727
* @author Eddú Meléndez
2828
* @since 1.5.0
2929
*/
30+
@FunctionalInterface
3031
public interface ClusterBuilderCustomizer {
3132

3233
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/jest/HttpClientConfigBuilderCustomizer.java

Lines changed: 2 additions & 1 deletion
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-2017 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,6 +27,7 @@
2727
* @author Stephane Nicoll
2828
* @since 1.5.0
2929
*/
30+
@FunctionalInterface
3031
public interface HttpClientConfigBuilderCustomizer {
3132

3233
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/IgnoredRequestCustomizer.java

Lines changed: 2 additions & 1 deletion
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-2017 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.
@@ -25,6 +25,7 @@
2525
* @author Madhura Bhave
2626
* @since 1.5.0
2727
*/
28+
@FunctionalInterface
2829
public interface IgnoredRequestCustomizer {
2930

3031
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoRestTemplateFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* @author Stephane Nicoll
2727
* @since 1.4.0
2828
*/
29+
@FunctionalInterface
2930
public interface UserInfoRestTemplateFactory {
3031

3132
/**

0 commit comments

Comments
 (0)