Bug 55187

Summary: Integer overflow when computing ONE_YEAR_MS in HTTP CacheManager
Product: JMeter - Now in Github Reporter: Scott Moore <sdmoore>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P2    
Version: 2.8   
Target Milestone: ---   
Hardware: Macintosh   
OS: All   

Description Scott Moore 2013-07-03 02:21:10 UTC
The calculation "long ONE_YEAR_MS = 365*86400*1000;" overflows (and computes the wrong value) because the constants are not marked as long. The result is 1,471,228,928 rather than 31,536,000,000.
Comment 1 Sebb 2013-07-05 08:45:54 UTC
Thanks, good catch!

Luckily the exact number of seconds is not critical - the expiry time is arbitrary. Fixed:

URL: http://svn.apache.org/r1499938
Log:
Integer overflow when computing ONE_YEAR_MS in HTTP CacheManager
Bugzilla Id: 55187

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 The ASF infrastructure team 2022-09-24 20:37:54 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3155