Skip to content

Commit b167e1a

Browse files
committed
Remove unnecessary final declarations (for consistency)
1 parent 8d735e6 commit b167e1a

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ private InjectionMetadata findAutowiringMetadata(String beanName, Class<?> clazz
459459
return metadata;
460460
}
461461

462-
private InjectionMetadata buildAutowiringMetadata(final Class<?> clazz) {
462+
private InjectionMetadata buildAutowiringMetadata(Class<?> clazz) {
463463
if (!AnnotationUtils.isCandidateClass(clazz, this.autowiredAnnotationTypes)) {
464464
return InjectionMetadata.EMPTY;
465465
}

spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public PropertyValues postProcessPropertyValues(
343343
}
344344

345345

346-
private InjectionMetadata findResourceMetadata(String beanName, final Class<?> clazz, @Nullable PropertyValues pvs) {
346+
private InjectionMetadata findResourceMetadata(String beanName, Class<?> clazz, @Nullable PropertyValues pvs) {
347347
// Fall back to class name as cache key, for backwards compatibility with custom callers.
348348
String cacheKey = (StringUtils.hasLength(beanName) ? beanName : clazz.getName());
349349
// Quick check on the concurrent map first, with minimal locking.
@@ -363,7 +363,7 @@ private InjectionMetadata findResourceMetadata(String beanName, final Class<?> c
363363
return metadata;
364364
}
365365

366-
private InjectionMetadata buildResourceMetadata(final Class<?> clazz) {
366+
private InjectionMetadata buildResourceMetadata(Class<?> clazz) {
367367
if (!AnnotationUtils.isCandidateClass(clazz, resourceAnnotationTypes)) {
368368
return InjectionMetadata.EMPTY;
369369
}

spring-context/src/main/java/org/springframework/context/annotation/ComponentScanAnnotationParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -65,7 +65,7 @@ public ComponentScanAnnotationParser(Environment environment, ResourceLoader res
6565
}
6666

6767

68-
public Set<BeanDefinitionHolder> parse(AnnotationAttributes componentScan, final String declaringClass) {
68+
public Set<BeanDefinitionHolder> parse(AnnotationAttributes componentScan, String declaringClass) {
6969
ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(this.registry,
7070
componentScan.getBoolean("useDefaultFilters"), this.environment, this.resourceLoader);
7171

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -453,8 +453,8 @@ private boolean isCurrentlyInvokedFactoryMethod(Method method) {
453453
* instance directly. If a FactoryBean instance is fetched through the container via &-dereferencing,
454454
* it will not be proxied. This too is aligned with the way XML configuration works.
455455
*/
456-
private Object enhanceFactoryBean(final Object factoryBean, Class<?> exposedType,
457-
final ConfigurableBeanFactory beanFactory, final String beanName) {
456+
private Object enhanceFactoryBean(Object factoryBean, Class<?> exposedType,
457+
ConfigurableBeanFactory beanFactory, String beanName) {
458458

459459
try {
460460
Class<?> clazz = factoryBean.getClass();
@@ -489,8 +489,8 @@ private Object enhanceFactoryBean(final Object factoryBean, Class<?> exposedType
489489
return createCglibProxyForFactoryBean(factoryBean, beanFactory, beanName);
490490
}
491491

492-
private Object createInterfaceProxyForFactoryBean(final Object factoryBean, Class<?> interfaceType,
493-
final ConfigurableBeanFactory beanFactory, final String beanName) {
492+
private Object createInterfaceProxyForFactoryBean(Object factoryBean, Class<?> interfaceType,
493+
ConfigurableBeanFactory beanFactory, String beanName) {
494494

495495
return Proxy.newProxyInstance(
496496
factoryBean.getClass().getClassLoader(), new Class<?>[] {interfaceType},
@@ -502,8 +502,8 @@ private Object createInterfaceProxyForFactoryBean(final Object factoryBean, Clas
502502
});
503503
}
504504

505-
private Object createCglibProxyForFactoryBean(final Object factoryBean,
506-
final ConfigurableBeanFactory beanFactory, final String beanName) {
505+
private Object createCglibProxyForFactoryBean(Object factoryBean,
506+
ConfigurableBeanFactory beanFactory, String beanName) {
507507

508508
Enhancer enhancer = new Enhancer();
509509
enhancer.setSuperclass(factoryBean.getClass());

spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -373,7 +373,7 @@ public boolean requiresDestruction(Object bean) {
373373
}
374374

375375

376-
private InjectionMetadata findPersistenceMetadata(String beanName, final Class<?> clazz, @Nullable PropertyValues pvs) {
376+
private InjectionMetadata findPersistenceMetadata(String beanName, Class<?> clazz, @Nullable PropertyValues pvs) {
377377
// Fall back to class name as cache key, for backwards compatibility with custom callers.
378378
String cacheKey = (StringUtils.hasLength(beanName) ? beanName : clazz.getName());
379379
// Quick check on the concurrent map first, with minimal locking.
@@ -393,7 +393,7 @@ private InjectionMetadata findPersistenceMetadata(String beanName, final Class<?
393393
return metadata;
394394
}
395395

396-
private InjectionMetadata buildPersistenceMetadata(final Class<?> clazz) {
396+
private InjectionMetadata buildPersistenceMetadata(Class<?> clazz) {
397397
if (!AnnotationUtils.isCandidateClass(clazz, Arrays.asList(PersistenceContext.class, PersistenceUnit.class))) {
398398
return InjectionMetadata.EMPTY;
399399
}

0 commit comments

Comments
 (0)