This is an automated email from the ASF dual-hosted git repository.

tv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git

commit 0a152060614806fe8618787a15b7a506c4193023
Author: Thomas Vandahl <[email protected]>
AuthorDate: Tue Apr 14 18:59:37 2026 +0200

    Make lists final
---
 .../java/org/apache/commons/jcs4/engine/stats/CacheStats.java | 11 +++++------
 .../main/java/org/apache/commons/jcs4/engine/stats/Stats.java |  9 ++++-----
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git 
a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/CacheStats.java
 
b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/CacheStats.java
index 22f8ac4b..80266f5c 100644
--- 
a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/CacheStats.java
+++ 
b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/CacheStats.java
@@ -1,8 +1,5 @@
 package org.apache.commons.jcs4.engine.stats;
 
-import java.util.ArrayList;
-import java.util.Collections;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -22,6 +19,8 @@ import java.util.Collections;
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import org.apache.commons.jcs4.engine.stats.behavior.ICacheStats;
@@ -43,7 +42,7 @@ public class CacheStats
     private String regionName;
 
     /** What that auxiliaries are reporting. */
-    private List<IStats> auxStats;
+    private final List<IStats> auxStats;
 
     /**
      * Default constructor
@@ -60,8 +59,8 @@ public class CacheStats
      */
     public CacheStats(String typeName)
     {
-        super(typeName);
-        this.auxStats = new ArrayList<>();
+        this();
+        setTypeName(typeName);
     }
 
     /**
diff --git 
a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/Stats.java
 
b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/Stats.java
index fc300301..d85ac551 100644
--- 
a/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/Stats.java
+++ 
b/commons-jcs4-core/src/main/java/org/apache/commons/jcs4/engine/stats/Stats.java
@@ -1,8 +1,5 @@
 package org.apache.commons.jcs4.engine.stats;
 
-import java.util.ArrayList;
-import java.util.Collections;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -22,6 +19,8 @@ import java.util.Collections;
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import org.apache.commons.jcs4.engine.stats.behavior.IStatElement;
@@ -36,7 +35,7 @@ public class Stats
     private static final long serialVersionUID = 227327902875154010L;
 
     /** The stats */
-    private List<IStatElement<?>> stats;
+    private final List<IStatElement<?>> stats;
 
     /** The type of stat */
     private String typeName;
@@ -56,7 +55,7 @@ public class Stats
     public Stats(String typeName)
     {
         this();
-        this.typeName = typeName;
+        setTypeName(typeName);
     }
 
     /**

Reply via email to