Skip to content

Commit 4cd89c4

Browse files
committed
Use final
1 parent 3220b08 commit 4cd89c4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/org/apache/commons/beanutils/FluentPropertyBeanIntrospector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public void introspect(final IntrospectionContext icontext)
158158
// We should not change statically cached PropertyDescriptor as it can be from super-type,
159159
// it may affect other subclasses of targetClass supertype.
160160
// See BEANUTILS-541 for more details.
161-
PropertyDescriptor fluentPropertyDescriptor = new PropertyDescriptor(
161+
final PropertyDescriptor fluentPropertyDescriptor = new PropertyDescriptor(
162162
pd.getName(), pd.getReadMethod(), m);
163163
// replace existing (possibly inherited from super-class) to one specific to current class
164164
icontext.addPropertyDescriptor(fluentPropertyDescriptor);

src/test/java/org/apache/commons/beanutils/bugs/Jira541TestCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ public void testFluentBeanIntrospectorOnOverriddenSetter() throws Exception {
7373

7474
@Test
7575
public void testFluentBeanIntrospectorOnOverriddenSetterConcurrent() throws Exception {
76-
ExecutorService executionService = Executors.newFixedThreadPool(256);
76+
final ExecutorService executionService = Executors.newFixedThreadPool(256);
7777
try {
78-
List<Future<?>> futures = new ArrayList<>();
78+
final List<Future<?>> futures = new ArrayList<>();
7979
for (int i = 0; i < 10000; i++) {
8080
futures.add(executionService.submit(() -> {
8181
testImpl();
8282
return null;
8383
}));
8484
}
85-
for (Future<?> future : futures) {
85+
for (final Future<?> future : futures) {
8686
future.get();
8787
}
8888
} finally {

0 commit comments

Comments
 (0)