[
http://issues.apache.org/jira/browse/TUSCANY-578?page=comments#action_12424123
]
Frank Budinsky commented on TUSCANY-578:
----------------------------------------
I'm adding the examples described in TUSCANY-580 and 581 here, to consolidate
this issue in one JIRA. If there are more issues found, please add them as
comments to this issue, instead of opening another one. Thanks. Frank.
Example 1 (from TUSCANY-581)
==========================
In V2.01 (dated November 2005) of the SDO specification it is stated in the
table on page 28 that a ClassCastException is expected when get cannot convert
from a value to the requested type. However, in many instances an
IllegalArgumentException is instead thrown.
Here is the example explicitly mentioned in the table as throwing a
ClassCastException (getDate on a float value), however an
IllegalArgumentException is seen in the test case.
// IllegalArgumentException when expecting ClassCastException
test_obj.setFloat("floatVal", Float.MAX_VALUE);
test_obj.getDate("floatVal");
Example 2 (from TUSCANY-580)
==========================
On page 27 of V2.01 of the spec, it is stated that both <DataObject>.get(-1)
and <DataObject>.get(getInstanceProperties().size() + 1) should result in an
IllegalArgumentException. However, each results in a NullPointerException.
Either the behavior or the specification should be updated.
> Exceptions thrown by SDO runtime not the same as defined in the spec
> --------------------------------------------------------------------
>
> Key: TUSCANY-578
> URL: http://issues.apache.org/jira/browse/TUSCANY-578
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Reporter: Brian Murray
> Priority: Minor
>
> On page 27 of V2.01 of the spec, specific exceptions are listed for certain
> kinds of errors. In some cases, a different exception is thrown (each case
> will be added as a subtask). Either the specification or the implementation
> should be updated.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]