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

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 231650e1b65a5872bb19896749e58b5781a25d41
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Thu Jul 11 15:03:16 2024 +0200

    Fixed: Trunk demo errors in error.log (OFBIZ-13005)
    
    Found these errors:
    
    ServerHitBin methods
      requestHistory
      eventHistory
      viewHistory
      requestSinceStarted
      eventSinceStarted
      viewSinceStarted
    
    Don't exist. They were changed with OFBIZ-11947, but not incorporated in
    StatBinsHistory and StatsSinceStart Groovy files? Here they are.
---
 .../apache/ofbiz/webtools/stats/StatBinsHistory.groovy |  6 +++---
 .../apache/ofbiz/webtools/stats/StatsSinceStart.groovy | 18 +++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatBinsHistory.groovy
 
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatBinsHistory.groovy
index 33d2b7538a..b7a94c7380 100644
--- 
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatBinsHistory.groovy
+++ 
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatBinsHistory.groovy
@@ -34,13 +34,13 @@ try {
 binList = null
 switch (type) {
     case ServerHitBin.REQUEST:
-        binList = ServerHitBin.requestHistory.get(id)
+        binList = ServerHitBin.REQ_HISTORY.get(id)
         break
     case ServerHitBin.EVENT:
-        binList = ServerHitBin.eventHistory.get(id)
+        binList = ServerHitBin.EVENT_HISTORY.get(id)
         break
     case ServerHitBin.VIEW:
-        binList = ServerHitBin.viewHistory.get(id)
+        binList = ServerHitBin.VIEW_HISTORY.get(id)
         break
 }
 
diff --git 
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatsSinceStart.groovy
 
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatsSinceStart.groovy
index 88b6c795a2..4cc6d08ecc 100644
--- 
a/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatsSinceStart.groovy
+++ 
b/framework/webtools/src/main/groovy/org/apache/ofbiz/webtools/stats/StatsSinceStart.groovy
@@ -24,17 +24,17 @@ import org.apache.ofbiz.webapp.stats.ServerHitBin
 
 clearBins = parameters.clear
 if (clearBins == 'true') {
-    ServerHitBin.requestSinceStarted.clear()
-    ServerHitBin.eventSinceStarted.clear()
-    ServerHitBin.viewSinceStarted.clear()
+    ServerHitBin.REQ_SINCE_STARTED.clear()
+    ServerHitBin.EVENT_SINCE_STARTED.clear()
+    ServerHitBin.VIEW_SINCE_STARTED.clear()
 }
 
 // Requests
-iterator = UtilMisc.toIterator(new 
TreeSet(ServerHitBin.requestSinceStarted.keySet()))
+iterator = UtilMisc.toIterator(new 
TreeSet(ServerHitBin.REQ_SINCE_STARTED.keySet()))
 requestList = []
 while (iterator.hasNext()) {
     statsId = iterator.next()
-    bin = ServerHitBin.requestSinceStarted.get(statsId)
+    bin = ServerHitBin.REQ_SINCE_STARTED.get(statsId)
     if (bin) {
         requestList.add(prepareRequestIdMap(bin))
     }
@@ -42,11 +42,11 @@ while (iterator.hasNext()) {
 context.requestList = requestList
 
 // Events
-iterator = UtilMisc.toIterator(new 
TreeSet(ServerHitBin.eventSinceStarted.keySet()))
+iterator = UtilMisc.toIterator(new 
TreeSet(ServerHitBin.EVENT_SINCE_STARTED.keySet()))
 eventList = []
 while (iterator.hasNext()) {
     statsId = iterator.next()
-    bin = ServerHitBin.eventSinceStarted.get(statsId)
+    bin = ServerHitBin.EVENT_SINCE_STARTED.get(statsId)
     if (bin) {
         eventList.add(prepareRequestIdMap(bin))
     }
@@ -54,11 +54,11 @@ while (iterator.hasNext()) {
 context.eventList = eventList
 
 // Views
-iterator = UtilMisc.toIterator(new 
TreeSet(ServerHitBin.viewSinceStarted.keySet()))
+iterator = UtilMisc.toIterator(new 
TreeSet(ServerHitBin.VIEW_SINCE_STARTED.keySet()))
 viewList = []
 while (iterator.hasNext()) {
     statsId = iterator.next()
-    bin = ServerHitBin.viewSinceStarted.get(statsId)
+    bin = ServerHitBin.VIEW_SINCE_STARTED.get(statsId)
     if (bin) {
         viewList.add(prepareRequestIdMap(bin))
     }

Reply via email to