Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013042Openbravo ERPA. Platformpublic2010-04-19 17:052010-05-28 00:00
shuehner 
gorkaion 
immediatemajorhave not tried
closedfixed 
5
pi 
2.50MP15 
Core
No
0013042: Utility.getPropertyValue raises expected exception as IllegalStateException (sublcass of RuntimeException)
The new Utility.getPropertyValue function can be used to read a value for the new property configuration project.


It calls the underlying pl-function AD_GET_PROPERTY_VALUE. This pl-function raises an exception in case of conflicting property values.

However the java-function does not explicitly handle/throw any exception but passes the sql-exception wrapped in a IllegalStateException (sublcass of RuntimeException).

Those do not need to thrown explicitely.

This means users of the utility-function do not even know that property-value conflicts to exists and do not handle them.
In that case the error will be raised and passed through the callers in an unpredictable way.
Get a data-conflict in for a property:
- add two 'Property configuration' entries for the same property, without marking any of them as selected.

Call the Utility.getPropertyValue function and check how the exception is raised.
Check if the exception should not be handled in a different way. If yes, change the method signature in MP15 to not force an API-change for it later.
No tags attached.
related to defect 0013048 closed gorkaion api check build 361 fails 
Issue History
2010-04-19 17:05shuehnerNew Issue
2010-04-19 17:05shuehnerAssigned To => alostale
2010-04-19 17:50alostaleAssigned Toalostale => gorkaion
2010-04-19 18:28shuehnerPriorityurgent => immediate
2010-04-19 18:28shuehnerStatusnew => scheduled
2010-04-19 18:28shuehnerFixed in Version => 2.50MP15
2010-04-19 19:07hgbotCheckin
2010-04-19 19:07hgbotNote Added: 0026350
2010-04-19 19:07hgbotStatusscheduled => resolved
2010-04-19 19:07hgbotResolutionopen => fixed
2010-04-19 19:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/05c4b6abd4d38e4dc4e853626933e7ac25721579 [^]
2010-04-20 10:23shuehnerRelationship addedrelated to 0013048
2010-04-21 10:43hudsonbotCheckin
2010-04-21 10:43hudsonbotNote Added: 0026525
2010-05-27 11:18gorkaionStatusresolved => closed
2010-05-28 00:00anonymoussf_bug_id0 => 3008200

Notes
(0026350)
hgbot   
2010-04-19 19:07   
Repository: erp/devel/pi
Changeset: 05c4b6abd4d38e4dc4e853626933e7ac25721579
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Apr 19 19:21:26 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/05c4b6abd4d38e4dc4e853626933e7ac25721579 [^]

Fixed issue 13042.Fixed exception management of the method.

---
M src/org/openbravo/erpCommon/ad_actionButton/InvoicePaymentMonitor.java
M src/org/openbravo/erpCommon/ad_process/PaymentMonitor.java
M src/org/openbravo/erpCommon/ad_process/PaymentMonitorProcess.java
M src/org/openbravo/erpCommon/utility/Utility.java
A src/org/openbravo/erpCommon/utility/PropertyException.java
---
(0026525)
hudsonbot   
2010-04-21 10:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/05c4b6abd4d3 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/6aaf8711c872 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17101.obx [^]