You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Brian Murray (JIRA)" <tu...@ws.apache.org> on 2006/07/26 20:47:13 UTC

[jira] Created: (TUSCANY-578) NullPointerException when expecting IllegalArgumentException

NullPointerException when expecting IllegalArgumentException
------------------------------------------------------------

                 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, 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.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino updated TUSCANY-578:
-------------------------------------------

    Patch Info: [Patch Available]

> Exceptions thrown by SDO runtime not the same as defined in the spec
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-578
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-578
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-SDO-Mx
>
>         Attachments: DataObjectUtil.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson updated TUSCANY-578:
-----------------------------------

        Fix Version/s:     (was: Java-SDO-Next)
                       Java-SDO-1.0
           Patch Info:   (was: [Patch Available])
    Affects Version/s:     (was: Java-SCA-M2)
                       Java-SDO-M2

> Exceptions thrown by SDO runtime not the same as defined in the spec
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-578
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-578
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-SDO-1.0
>
>         Attachments: 578.patch, 578.patch, 578.zip, 578.zip, DataObjectUtil.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Andy Grove (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-578?page=all ]

Andy Grove updated TUSCANY-578:
-------------------------------

    Attachment: DataObjectUtil.patch

This patch file is for java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java and replaces the use of IllegalArgumentException with ClassCastException in type conversion methods.

> 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
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-Mx
>
>         Attachments: DataObjectUtil.patch
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-578?page=comments#action_12454700 ] 
            
Kelvin Goodson commented on TUSCANY-578:
----------------------------------------

Transferring in TUSCANY-951
here's the report
==========================

Calling set() with an invalid property name results in a NullPointerException. For example:

dataObject.setInt("invalidProperty", 5);

results in:
java.lang.NullPointerException
at org.apache.tuscany.sdo.util.DataObjectUtil.getSetValue(DataObjectUtil.java:1440)
at org.apache.tuscany.sdo.util.DataObjectUtil.setInt(DataObjectUtil.java:537)
at org.apache.tuscany.sdo.impl.DataObjectImpl.setInt(DataObjectImpl.java:526)
===========================
and my duplicated comments ....
===========================
...... the spec isn't specific about the type of exception that should be thrown in this case, and the changes made under TUSCANY-885 have altered the behaviour of the tuscany implementation without violating the spec.   We need to review in general whether we should take the performance hit of catching and translating Exceptions to be more specific about issues. 
===========================


> 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
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-Mx
>
>         Attachments: DataObjectUtil.patch
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-578?page=comments#action_12454995 ] 
            
Yang ZHONG commented on TUSCANY-578:
------------------------------------

935 is fixed.

> 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
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-Mx
>
>         Attachments: DataObjectUtil.patch
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-578?page=comments#action_12454761 ] 
            
Yang ZHONG commented on TUSCANY-578:
------------------------------------

Having discussed with Frank, will fix this along within 935

> 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
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-Mx
>
>         Attachments: DataObjectUtil.patch
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-578?page=all ]

Frank Budinsky updated TUSCANY-578:
-----------------------------------

    Fix Version/s: Java-Mx
                       (was: Java-M2)

> 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
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-Mx
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Brian Murray (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Murray updated TUSCANY-578:
---------------------------------


Thank you Yang, Kelvin, and Andy for addressing the tasks I originally opened for this Jira.

I understand that this Jira is now intended to be a bucket for all Exception mismatches between the specification and the implementation.  

I will take the todo to try to flush out the remaining instances.  At which time they can be either corrected in the implementation or the spec can be made less specific, on a case by case basis.

> Exceptions thrown by SDO runtime not the same as defined in the spec
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-578
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-578
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-SDO-Mx
>
>         Attachments: DataObjectUtil.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-578?page=all ]

ant elder updated TUSCANY-578:
------------------------------

        Fix Version/s: Java-M2
    Affects Version/s: Java-M2

> 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
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-M2
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-578?page=comments#action_12450736 ] 
            
Kelvin Goodson commented on TUSCANY-578:
----------------------------------------

I applied this patch,  but I had to fix it up a little first.  For Info, here is the diff that I needed to make before the patch would apply

1,2c1,4
< --- DataObjectUtil.java       2006-11-15 20:39:10.186000000 +0000
< +++ DataObjectUtil.new        2006-11-17 11:32:34.421875000 +0000
---
> Index: DataObjectUtil.java
> ===================================================================
> --- DataObjectUtil.java       (revision 475408)
> +++ DataObjectUtil.java       (working copy)


> 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
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-Mx
>
>         Attachments: DataObjectUtil.patch
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Brian Murray (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Murray updated TUSCANY-578:
---------------------------------

    Attachment: 578.patch
                578.zip

Attaching updated versions of 578.zip and 578.patch.   These changes are merely updates to ensure that applying the patch goes more smoothly and to pick up changes in the XSD2JavaGenerator output for the generated classes in the test case.

Would a commiter please review these changers?  Note that the three exclusions listed in the above comment still apply, and this will result in three of the test cases failing even after the patch is applied.  However, for the reasons also listed I don't think that these should be corrected.  Please let me know if you feel differently.

> Exceptions thrown by SDO runtime not the same as defined in the spec
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-578
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-578
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SCA-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 578.patch, 578.patch, 578.zip, 578.zip, DataObjectUtil.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson resolved TUSCANY-578.
------------------------------------

    Resolution: Fixed

I applied the patch to the trunk and the branch, thanks.  I changed the package of the example code to example.org.xxx as we don't own com.sdo.xxx.  Ia commented out the failing tests you reference with a "// Not fixed in TUSCANY-578" comment,  as I plan to close this defect now,  and open a fresh one to keep track of remaining / future issues. This one is way to complicated to use any more.

> Exceptions thrown by SDO runtime not the same as defined in the spec
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-578
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-578
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SCA-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 578.patch, 578.patch, 578.zip, 578.zip, DataObjectUtil.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Brian Murray (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Murray updated TUSCANY-578:
---------------------------------

    Attachment: 578.patch
                578.zip

I have attached a test case (contained in 578.zip) that verifies each of the explicitly identified Exceptions in the spec.   I have also attached a patch for several of the issues that were identified using the test case.

There were some issues identified that I do not think can be corrected in a manner with small enough of an impact given the nature of the correction being made.  Those issues are:

** Altering read-only property through Sequence interface throws wrong Exception.
Expected Behavior:  UnsupportedOperationException is thrown
Observed Behavior:  RuntimeException
Cause:  In BasicFeatureMap, if (!eStructuralFeature.isChangeable()) a RuntimeException is thrown.
Problem:  That is EMF code.  It is bad form to catch RuntimeException (somewhat analogous to catching Exception), so it would be unwise to try to catch this in SDO code simply to throw UnsupportedOperationException.


** Expected Exceptions from the List interface.
Expected Behavior:   (e.g.  List.get(-1) should throw an IndexOutOfBoundsException)
Observed Behavior:  (e.g.  List.get(-1) throws NullPointerException, in some cases)
Note:  Similar statements hold for using the List interface to alter a read-only Property
Problem:   The List method calls fall directly into the EMF List implementations.  There is not an SDO layer with which we could try to catch various Exceptions and throw the one indicated in our spec.


** DataObject.get(property) with an invalid property does not throw the appropriate Exception in the static case.
Note:  This test case is done using property1 from type1, and dataObject2 of type2.  Calling dataObject2.get(property1) should throw the appropriate Exception, and does so in the dynamic cases.
Expected Behavior:  IllegalArgumentException is thrown
Observed Behavior: No Exception is thrown.  Instead, the get() is performed using the Property index (index in the other type) of the invalid property.  The property in type2 (the DataObject)  that happens to have the same index value as property1 in type1 is not meaningful, but that is what is used.
Cause:  eDerivedStructuralFeatureID(eFeature) should return -1 and does so in the dynamic case.  However in the static case this method is handled by BasicEObjectImpl., which determines the containingClass but never uses it in any way.  The containingClass should be used to determine that the property is not valid for that class. 
Problem:  This is EMF code.


Please let me know your thoughts on the outstanding issues.  

If you agree that they cannot be reasonably corrected, and you agree that the test case covers the complete set of explicitly identified Exceptions then please mark the Jira fixed.

> Exceptions thrown by SDO runtime not the same as defined in the spec
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-578
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-578
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-M2
>            Reporter: Brian Murray
>            Priority: Minor
>             Fix For: Java-SDO-Mx
>
>         Attachments: 578.patch, 578.zip, DataObjectUtil.patch
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-578) Exceptions thrown by SDO runtime not the same as defined in the spec

Posted by "Brent Daniel (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-578?page=all ]

Brent Daniel updated TUSCANY-578:
---------------------------------

        Summary: Exceptions thrown by SDO runtime not the same as defined in the spec  (was: NullPointerException when expecting IllegalArgumentException)
    Description: 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.  (was: 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.)

Edited on Brian's request

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org