svn commit: r1838257 - in /ofbiz/ofbiz-framework/branches/release17.12: ./ applications/accounting/data/ framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1838257 - in /ofbiz/ofbiz-framework/branches/release17.12: ./ applications/accounting/data/ framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/

adityasharma
Author: adityasharma
Date: Fri Aug 17 12:53:32 2018
New Revision: 1838257

URL: http://svn.apache.org/viewvc?rev=1838257&view=rev
Log:
Applied fix from trunk for revision: 1838256
===

Improved: Remove checks to store only 250 characters of URL in VisitHandler.getVisit() & ServerHitBin.saveHit()
(OFBIZ-10508)
When the code was committed the 'URL' field type had a size of 255 characters only which was later changed to 2000 characters. So, the above code logic to restrict no of characters can be removed now.
Removed null pointer check for initialRequest and initialReferrer as it is already handled while setting the values in UtilHttp.setInitialRequestInfo() method.

Modified:
    ofbiz/ofbiz-framework/branches/release17.12/   (props changed)
    ofbiz/ofbiz-framework/branches/release17.12/applications/accounting/data/AccountingScheduledServiceData.xml
    ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/ServerHitBin.java
    ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java

Propchange: ofbiz/ofbiz-framework/branches/release17.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 17 12:53:32 2018
@@ -10,4 +10,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1819499,1819598,1819800,1819805,1819811,1820038,1820262,1820374-1820375,1820441,1820457,1820644,1820658,1820790,1820823,1820949,1820966,1821012,1821036,1821112,1821115,1821144,1821186,1821219,1821226,1821230,1821386,1821613,1821628,1821965,1822125,1822310,1822377,1822383,1822393,1823467,1823562,1823876,1824314,1824316,1824732,1824803,1824847,1824855,1825192,1825211,1825216,1825233,1825450,1826374,1826502,1826592,1826671,1826674,1826805,1826938,1826997,1827439,1828255,1828316,1828346,1828424,1828512,1828514,1829690,1830936,1831074,1831078,1831234,1831608,1831831,1832577,1832662,1832756,1832800,1832944,1833173,1833211,1834181,1834191,1834736,1835235,1835887,1835891,1835953,1835964,1836144,1836871,1837857,1838032
+/ofbiz/ofbiz-framework/trunk:1819499,1819598,1819800,1819805,1819811,1820038,1820262,1820374-1820375,1820441,1820457,1820644,1820658,1820790,1820823,1820949,1820966,1821012,1821036,1821112,1821115,1821144,1821186,1821219,1821226,1821230,1821386,1821613,1821628,1821965,1822125,1822310,1822377,1822383,1822393,1823467,1823562,1823876,1824314,1824316,1824732,1824803,1824847,1824855,1825192,1825211,1825216,1825233,1825450,1826374,1826502,1826592,1826671,1826674,1826805,1826938,1826997,1827439,1828255,1828316,1828346,1828424,1828512,1828514,1829690,1830936,1831074,1831078,1831234,1831608,1831831,1832577,1832662,1832756,1832800,1832944,1833173,1833211,1834181,1834191,1834736,1835235,1835887,1835891,1835953,1835964,1836144,1836871,1837857,1838032,1838256

Modified: ofbiz/ofbiz-framework/branches/release17.12/applications/accounting/data/AccountingScheduledServiceData.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/accounting/data/AccountingScheduledServiceData.xml?rev=1838257&r1=1838256&r2=1838257&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/accounting/data/AccountingScheduledServiceData.xml (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/accounting/data/AccountingScheduledServiceData.xml Fri Aug 17 12:53:32 2018
@@ -20,8 +20,8 @@ under the License.
 
 <entity-engine-xml>
     <RecurrenceRule recurrenceRuleId="400" untilDateTime="" frequency="MONTHLY" intervalNumber="1" countNumber="-1"/>
-    <RecurrenceInfo recurrenceInfoId="400" startDateTime="2008-05-14 22:00:00.000" recurrenceRuleId="400" recurrenceCount="0"/>
     <RuntimeData runtimeDataId="8501">
+        <RecurrenceInfo recurrenceInfoId="400" startDateTime="2008-05-14 22:00:00.000" recurrenceRuleId="400" recurrenceCount="0"/>
         <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
             <ofbiz-ser>
                 <map-HashMap>

Modified: ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/ServerHitBin.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/ServerHitBin.java?rev=1838257&r1=1838256&r2=1838257&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/ServerHitBin.java (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/ServerHitBin.java Fri Aug 17 12:53:32 2018
@@ -516,10 +516,10 @@ public class ServerHitBin {
 
             String fullRequestUrl = UtilHttp.getFullRequestUrl(request);
 
-            serverHit.set("requestUrl", fullRequestUrl.length() > 250 ? fullRequestUrl.substring(0, 250) : fullRequestUrl);
+            serverHit.set("requestUrl", fullRequestUrl);
             String referrerUrl = request.getHeader("Referer") != null ? request.getHeader("Referer") : "";
 
-            serverHit.set("referrerUrl", referrerUrl.length() > 250 ? referrerUrl.substring(0, 250) : referrerUrl);
+            serverHit.set("referrerUrl", referrerUrl);
 
             // get localhost ip address and hostname to store
             if (VisitHandler.address != null) {

Modified: ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java?rev=1838257&r1=1838256&r2=1838257&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/framework/webapp/src/main/java/org/apache/ofbiz/webapp/stats/VisitHandler.java Fri Aug 17 12:53:32 2018
@@ -147,8 +147,8 @@ public class VisitHandler {
                             visit.set("fromDate", new Timestamp(session.getCreationTime()));
 
                             visit.set("initialLocale", initialLocale);
-                            if (initialRequest != null) visit.set("initialRequest", initialRequest.length() > 250 ? initialRequest.substring(0, 250) : initialRequest);
-                            if (initialReferrer != null) visit.set("initialReferrer", initialReferrer.length() > 250 ? initialReferrer.substring(0, 250) : initialReferrer);
+                            visit.set("initialRequest", initialRequest);
+                            visit.set("initialReferrer", initialReferrer);
                             if (initialUserAgent != null) visit.set("initialUserAgent", initialUserAgent.length() > 250 ? initialUserAgent.substring(0, 250) : initialUserAgent);
                             visit.set("webappName", webappName);
                             if (UtilProperties.propertyValueEquals("serverstats", "stats.proxy.enabled", "true")) {