You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/07/21 10:44:09 UTC

svn commit: r1364047 - in /ofbiz/branches/release12.04: ./ framework/webapp/ framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java

Author: jleroux
Date: Sat Jul 21 08:44:09 2012
New Revision: 1364047

URL: http://svn.apache.org/viewvc?rev=1364047&view=rev
Log:
"Applied fix from trunk for revision: 1364046  " 
------------------------------------------------------------------------
r1364046 | jleroux | 2012-07-21 10:43:19 +0200 (sam., 21 juil. 2012) | 13 lines

A patch from Leon for "IndexOutOfBoundsException thrown by ServerHitBin.countHit" https://issues.apache.org/jira/browse/OFBIZ-4969

This exception thrown out when initiated a "json" request.

    229156224 [http-bio-0.0.0.0-443-exec-6138] ERROR org.ofbiz.webapp.control.ControlServlet -
    ---- runtime exception report --------------------------------------------------
    Error in request handler:
    Exception: java.lang.IndexOutOfBoundsException
    Message: index: 0
    ---- stack trace ---------------------------------------------------------------
    java.lang.IndexOutOfBoundsException: index: 0
    javolution.util.FastList.add(FastList.java:228)
    org.ofbiz.webapp.stats.ServerHitBin.countHit(ServerHitBin.java:210)
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/framework/webapp/   (props changed)
    ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1364046

Propchange: ofbiz/branches/release12.04/framework/webapp/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk/framework/webapp:r1364046

Modified: ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java?rev=1364047&r1=1364046&r2=1364047&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java (original)
+++ ofbiz/branches/release12.04/framework/webapp/src/org/ofbiz/webapp/stats/ServerHitBin.java Sat Jul 21 08:44:09 2012
@@ -207,7 +207,11 @@ public class ServerHitBin {
                 }
                 if (bin == null) {
                     bin = new ServerHitBin(id, type, true, delegator);
-                    binList.add(0, bin);
+                    if (binList.size() > 0) {
+                        binList.add(0, bin);
+                    } else {
+                        binList.add(bin);
+                    }
                 }
             }
         }