diff --git a/core/pom.xml b/core/pom.xml
index dfef11e89f3..92c246523ca 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -453,12 +453,6 @@
-
- net.sf.ehcache
- ehcache-core
- ${ehcache-core.version}
- compile
-
org.mozilla
rhino
diff --git a/extensions/pom.xml b/extensions/pom.xml
index d3054b48248..874155d759c 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -534,18 +534,6 @@
-
- net.sf.ehcache
- ehcache-core
- ${ehcache-core.version}
- compile
-
-
- *
- *
-
-
-
cglib
cglib-nodep
diff --git a/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java b/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java
index 98ba6e06f8f..2d7b3ce1422 100644
--- a/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java
+++ b/extensions/src/main/java/org/pentaho/platform/plugin/services/cache/CacheManager.java
@@ -14,13 +14,14 @@
* See the GNU Lesser General Public License for more details.
*
*
- * Copyright (c) 2002-2023 Hitachi Vantara. All rights reserved.
+ * Copyright (c) 2002-2024 Hitachi Vantara. All rights reserved.
*
*/
package org.pentaho.platform.plugin.services.cache;
import net.sf.ehcache.Ehcache;
+import net.sf.ehcache.management.CacheStatistics;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dom4j.Element;
@@ -505,18 +506,13 @@ public long getElementCountInRegionCache( String region ) {
Ehcache ehcache = hvcache.getStorageAccess().getCache();
if ( hvcache != null ) {
try {
- long memCnt = ehcache.getStatistics().getMemoryStoreObjectCount();
- long discCnt = ehcache.getStatistics().getDiskStoreObjectCount();
- return memCnt + discCnt;
+ CacheStatistics cacheStatistics = new CacheStatistics( ehcache );
+ return cacheStatistics.getMemoryStoreObjectCount() + cacheStatistics.getDiskStoreObjectCount();
} catch ( Exception ignored ) {
- return -1;
}
- } else {
- return -1;
}
- } else {
- return -1;
}
+ return -1;
}
@Override
diff --git a/pom.xml b/pom.xml
index 542ec5ba5e8..38eb02cc0ac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,7 +147,6 @@
1.0
1.2
1.6.3
- 2.5.1
4.0.0
1.5.5
1.0.16
diff --git a/repository/pom.xml b/repository/pom.xml
index 9415b8c1c86..790bec0313a 100644
--- a/repository/pom.xml
+++ b/repository/pom.xml
@@ -460,17 +460,6 @@
-
- net.sf.ehcache
- ehcache-core
- ${ehcache-core.version}
-
-
- *
- *
-
-
-
cglib
cglib