Skip to content

Commit f69c994

Browse files
committed
Merge pull request spring-projects#6857 from Eddú Meléndez
* spring-projectsgh-6857: Add @FunctionalInterface to remaining public and protected interfaces Annotate interfaces with @FunctionaInterface
2 parents 6d70c06 + 31b0e81 commit f69c994

File tree

94 files changed

+106
-17
lines changed

Some content is hidden

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

94 files changed

+106
-17
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/CacheStatisticsProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* @author Phillip Webb
2828
* @since 1.3.0
2929
*/
30+
@FunctionalInterface
3031
public interface CacheStatisticsProvider<C extends Cache> {
3132

3233
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @author Dave Syer
3030
* @see SystemPublicMetrics SystemPublicMetrics for an example implementation
3131
*/
32+
@FunctionalInterface
3233
public interface PublicMetrics {
3334

3435
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* @author Dave Syer
2323
* @since 1.2.0
2424
*/
25+
@FunctionalInterface
2526
public interface EndpointHandlerMappingCustomizer {
2627

2728
/**

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/ManagementServletContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* @author Phillip Webb
2323
* @since 1.3.0
2424
*/
25+
@FunctionalInterface
2526
public interface ManagementServletContext {
2627

2728
/**

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/health/HealthAggregator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* @author Christian Dupuis
3535
* @since 1.1.0
3636
*/
37+
@FunctionalInterface
3738
public interface HealthAggregator {
3839

3940
/**

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthIndicator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* @author Dave Syer
2323
* @see ApplicationHealthIndicator
2424
*/
25+
@FunctionalInterface
2526
public interface HealthIndicator {
2627

2728
/**

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/InfoContributor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* @author Stephane Nicoll
2323
* @since 1.4.0
2424
*/
25+
@FunctionalInterface
2526
public interface InfoContributor {
2627

2728
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*
2828
* @author Dave Syer
2929
*/
30+
@FunctionalInterface
3031
public interface GaugeService {
3132

3233
/**

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/export/Exporter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* @author Dave Syer
2828
* @since 1.3.0
2929
*/
30+
@FunctionalInterface
3031
public interface Exporter {
3132

3233
/**

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/opentsdb/OpenTsdbNamingStrategy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* @author Dave Syer
2323
* @since 1.3.0
2424
*/
25+
@FunctionalInterface
2526
public interface OpenTsdbNamingStrategy {
2627

2728
/**

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/reader/PrefixMetricReader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @author Dave Syer
2525
*/
26+
@FunctionalInterface
2627
public interface PrefixMetricReader {
2728

2829
/**

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-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/GaugeWriter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @author Dave Syer
2525
* @since 1.3.0
2626
*/
27+
@FunctionalInterface
2728
public interface GaugeWriter {
2829

2930
/**

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/cache/CacheManagerCustomizer.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.3.3
2828
*/
29+
@FunctionalInterface
2930
public interface CacheManagerCustomizer<T extends CacheManager> {
3031

3132
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/JCacheManagerCustomizer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @author Stephane Nicoll
2626
* @since 1.3.0
2727
*/
28+
@FunctionalInterface
2829
public interface JCacheManagerCustomizer {
2930

3031
/**

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/flyway/FlywayMigrationStrategy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @author Andreas Ahlenstorf
2626
* @author Phillip Webb
2727
*/
28+
@FunctionalInterface
2829
public interface FlywayMigrationStrategy {
2930

3031
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/Jackson2ObjectMapperBuilderCustomizer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* @author Grzegorz Poznachowski
2929
* @since 1.4.0
3030
*/
31+
@FunctionalInterface
3132
public interface Jackson2ObjectMapperBuilderCustomizer {
3233

3334
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadataProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @author Stephane Nicoll
2525
* @since 1.2.0
2626
*/
27+
@FunctionalInterface
2728
public interface DataSourcePoolMetadataProvider {
2829

2930
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/ResourceConfigCustomizer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @author Eddú Meléndez
2626
* @since 1.4.0
2727
*/
28+
@FunctionalInterface
2829
public interface ResourceConfigCustomizer {
2930

3031
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisConfigurationCustomizer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @since 1.3.0
3030
* @see ArtemisAutoConfiguration
3131
*/
32+
@FunctionalInterface
3233
public interface ArtemisConfigurationCustomizer {
3334

3435
/**

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/AuthoritiesExtractor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* @author Dave Syer
2929
* @since 1.3.0
3030
*/
31+
@FunctionalInterface
3132
public interface AuthoritiesExtractor {
3233

3334
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @author Dave Syer
2626
* @since 1.3.0
2727
*/
28+
@FunctionalInterface
2829
public interface JwtAccessTokenConverterConfigurer {
2930

3031
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @author Phillip Webb
2626
* @since 1.4.0
2727
*/
28+
@FunctionalInterface
2829
public interface PrincipalExtractor {
2930

3031
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @author Dave Syer
3030
* @since 1.3.0
3131
*/
32+
@FunctionalInterface
3233
public interface UserInfoRestTemplateCustomizer {
3334

3435
/**

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
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProvider.java

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

3132
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/PlatformTransactionManagerCustomizer.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 Phillip Webb
2828
* @since 1.5.0
2929
*/
30+
@FunctionalInterface
3031
public interface PlatformTransactionManagerCustomizer<T extends PlatformTransactionManager> {
3132

3233
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*
2525
* @author Phillip Webb
2626
*/
27+
@FunctionalInterface
2728
public interface ErrorController {
2829

2930
/**

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorViewResolver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @author Phillip Webb
3030
* @since 1.4.0
3131
*/
32+
@FunctionalInterface
3233
public interface ErrorViewResolver {
3334

3435
/**

spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*
2626
* @author Dave Syer
2727
*/
28+
@FunctionalInterface
2829
public interface CommandFactory {
2930

3031
/**

spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/DependencyResolver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* @author Andy Wilkinson
2727
* @since 1.2.0
2828
*/
29+
@FunctionalInterface
2930
interface DependencyResolver {
3031

3132
/**

spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/SpringBootAstTransformation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*
2525
* @author Dave Syer
2626
*/
27+
@FunctionalInterface
2728
public interface SpringBootAstTransformation extends ASTTransformation {
2829

2930
}

spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/ProgressReporter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*
2222
* @author Andy Wilkinson
2323
*/
24+
@FunctionalInterface
2425
interface ProgressReporter {
2526

2627
/**

spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/RepositorySystemSessionAutoConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*
2626
* @author Andy Wilkinson
2727
*/
28+
@FunctionalInterface
2829
public interface RepositorySystemSessionAutoConfiguration {
2930

3031
/**

spring-boot-devtools/src/main/java/org/springframework/boot/devtools/classpath/ClassPathRestartStrategy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* @since 1.3.0
2828
* @see PatternClassPathRestartStrategy
2929
*/
30+
@FunctionalInterface
3031
public interface ClassPathRestartStrategy {
3132

3233
/**

0 commit comments

Comments
 (0)