IDEMPIERE-5755 - Empty value preference logs false parsing error on Dates (#1875)

This commit is contained in:
Peter Takács 2023-06-07 00:33:39 +02:00 committed by GitHub
parent 5602a15f04
commit 34aa34d55f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1069,7 +1069,9 @@ public class GridField
SimpleDateFormat dateFormat = DisplayType.getDateFormat_JDBC();
SimpleDateFormat timeFormat = DisplayType.getTimeFormat_Default();
try {
if (m_vo.displayType == DisplayType.Date) {
if(Util.isEmpty(value, true)) {
return null;
} else if (m_vo.displayType == DisplayType.Date) {
date = dateFormat.parse (value);
} else if (m_vo.displayType == DisplayType.Time) {
date = timeFormat.parse (value);