Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028687Openbravo ERPA. Platformpublic2015-01-20 12:412015-11-23 21:17
caristu 
caristu 
normalminoralways
closedfixed 
5
pi 
3.0PR16Q1 
alostale
Core
No
0028687: IllegalArgumentException should be captured in QueryListDataSource
IllegalArgumentException should be captured in QueryListDataSource class. If we have a widget that displays a Date column and some of the records have a null value, then the widget records are not displayed because the following exception is thrown:

java.lang.IllegalArgumentException: Cannot format given Object as a Date
    at java.text.DateFormat.format(DateFormat.java:298)
    at java.text.Format.format(Format.java:157)
    at org.openbravo.client.querylist.QueryListDataSource.getData(QueryListDataSource.java:226)
1) Install the attached module
2) Give access to a role for the widget "Null Date"
3) Add that widget into the workspace, notice that it does not display any record and the mentioned exception appears in the log
Check if 'value' is null before performing the following operation: xmlDateFormat.format(value);
No tags attached.
? com.openbravo.support.widget-1.0.0.obx (5,170) 2015-01-20 12:59
https://issues.openbravo.com/file_download.php?file_id=7707&type=bug
Issue History
2015-01-20 12:41caristuNew Issue
2015-01-20 12:41caristuAssigned To => AugustoMauch
2015-01-20 12:41caristuModules => Core
2015-01-20 12:41caristuResolution time => 1428271200
2015-01-20 12:41caristuTriggers an Emergency Pack => No
2015-01-20 12:42caristuIssue Monitored: networkb
2015-01-20 12:59caristuFile Added: com.openbravo.support.widget-1.0.0.obx
2015-01-20 12:59caristuProposed Solution updated
2015-01-20 13:00caristuversion => pi
2015-01-20 13:00caristuTarget Version => 3.0PR15Q2
2015-01-25 20:57eugeniIssue Monitored: eugeni
2015-01-29 13:17alostaleStatusnew => acknowledged
2015-03-11 10:02alostalePriorityhigh => normal
2015-03-16 13:25jonalegriaesarteResolution time1428271200 =>
2015-03-17 14:37alostaleAssigned ToAugustoMauch => platform
2015-03-25 09:04alostaleTarget Version3.0PR15Q2 =>
2015-11-13 09:48caristuAssigned Toplatform => caristu
2015-11-13 09:48caristuStatusacknowledged => scheduled
2015-11-13 10:08hgbotCheckin
2015-11-13 10:08hgbotNote Added: 0081806
2015-11-13 10:08hgbotStatusscheduled => resolved
2015-11-13 10:08hgbotResolutionopen => fixed
2015-11-13 10:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fb1256d74142b1659cd5cce801074fb37abd2eaf [^]
2015-11-13 10:08caristuReview Assigned To => alostale
2015-11-13 10:08caristuIssue Monitored: alostale
2015-11-16 12:18alostaleNote Added: 0081869
2015-11-16 12:18alostaleStatusresolved => closed
2015-11-16 12:18alostaleFixed in Version => 3.0PR16Q1
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082225

Notes
(0081806)
hgbot   
2015-11-13 10:08   
Repository: erp/devel/pi
Changeset: fb1256d74142b1659cd5cce801074fb37abd2eaf
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Nov 13 10:07:21 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fb1256d74142b1659cd5cce801074fb37abd2eaf [^]

fixes issue 28687: IllegalArgumentException in QueryListDataSource

The exception will not be thrown anymore as we now check if value is null before executing xmlDateFormat.format(value).

---
M modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
---
(0081869)
alostale   
2015-11-16 12:18   
code reviewed + tested
(0082225)
hudsonbot   
2015-11-23 21:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test