Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0033367 | Openbravo ERP | A. Platform | public | 2016-06-28 10:51 | 2016-08-11 18:40 |
|
Reporter | caristu | |
Assigned To | caristu | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0PR16Q4 | Fixed in Version | 3.0PR16Q4 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0033367: testChangedClasses method in SystemServiceTest does not calculate the past date correctly |
Description | The SystemServiceTest in testChangedClasses is not calculating the 600 days in the past date correctly. It uses the following:
final Date past = new Date(System.currentTimeMillis() - (1000 * 60 * 60 * 24 * 600));
If the number of days is over 24, the resulting value is larger than Integer.MAX_VALUE and the value overflows. So, the resulting past date is a future date.
More info: http://stackoverflow.com/a/6866756 [^] |
Steps To Reproduce | 1) Debug the SystemServiceTest, placing a breakpoint in the following line[1]
2) Notice that the date calculated is NOT 600 days in the past
[1] https://code.openbravo.com/erp/devel/pi/file/cc5f703395d6/src-test/src/org/openbravo/test/system/SystemServiceTest.java#l87 [^] |
Proposed Solution | Apply one of the proposed solutions explained here: http://stackoverflow.com/a/6866756 [^] |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | issue33367.diff (764) 2016-06-28 10:54 https://issues.openbravo.com/file_download.php?file_id=9589&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2016-06-28 10:51 | caristu | New Issue | |
2016-06-28 10:51 | caristu | Assigned To | => platform |
2016-06-28 10:51 | caristu | OBNetwork customer | => No |
2016-06-28 10:51 | caristu | Modules | => Core |
2016-06-28 10:51 | caristu | Triggers an Emergency Pack | => No |
2016-06-28 10:51 | caristu | Assigned To | platform => caristu |
2016-06-28 10:51 | caristu | Status | new => scheduled |
2016-06-28 10:52 | caristu | Target Version | => 3.0PR16Q4 |
2016-06-28 10:54 | caristu | File Added: issue33367.diff | |
2016-07-18 13:27 | hgbot | Checkin | |
2016-07-18 13:27 | hgbot | Note Added: 0088552 | |
2016-07-18 13:27 | hgbot | Status | scheduled => resolved |
2016-07-18 13:27 | hgbot | Resolution | open => fixed |
2016-07-18 13:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/94d8c7dd940c035bd529a20db04407a9a82b4b23 [^] |
2016-07-18 13:28 | caristu | Review Assigned To | => alostale |
2016-07-18 13:28 | caristu | Issue Monitored: alostale | |
2016-07-22 10:23 | alostale | Note Added: 0088624 | |
2016-07-22 10:23 | alostale | Status | resolved => closed |
2016-07-22 10:23 | alostale | Fixed in Version | => 3.0PR16Q4 |
2016-08-11 18:40 | hudsonbot | Checkin | |
2016-08-11 18:40 | hudsonbot | Note Added: 0089019 | |