You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/02/11 13:19:44 UTC
(commons-pool) 10/30: Add Checkstyle FinalLocalVariable
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch POOL_2_X
in repository https://gitbox.apache.org/repos/asf/commons-pool.git
commit 4501b62187b839377cb574cb445cf1186b798f22
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Mon Feb 10 16:37:00 2025 -0500
Add Checkstyle FinalLocalVariable
---
src/conf/checkstyle.xml | 1 +
src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/conf/checkstyle.xml b/src/conf/checkstyle.xml
index c63ca659..c0110e0f 100644
--- a/src/conf/checkstyle.xml
+++ b/src/conf/checkstyle.xml
@@ -55,6 +55,7 @@
</module>
<module name="EqualsHashCode" />
<module name="ExplicitInitialization" />
+ <module name="FinalLocalVariable" />
<module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean, java.lang.String" />
</module>
diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
index 35d32e14..ab175c3e 100644
--- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
+++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
@@ -1257,7 +1257,7 @@ public abstract class BaseGenericObjectPool<T> extends BaseObject implements Aut
}
while (!registered) {
try {
- ObjectName objName;
+ final ObjectName objName;
// Skip the numeric suffix for the first pool in case there is
// only one so the names are cleaner.
if (i == 1) {