You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2007/07/16 06:39:04 UTC

[jira] Created: (TUSCANY-1436) TypeHelper.getType(java.util.List.class) throws ClassCastException

TypeHelper.getType(java.util.List.class) throws ClassCastException
------------------------------------------------------------------

                 Key: TUSCANY-1436
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1436
             Project: Tuscany
          Issue Type: Bug
          Components: Java SDO Implementation
    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
            Reporter: Raymond Feng
            Priority: Critical


The following simple test case fails:

package org.apache.tuscany.sdo.test;

import java.util.List;

import junit.framework.TestCase;

import commonj.sdo.helper.TypeHelper;

/**
 * @version $Rev$ $Date$
 */
public class TypeHelperTestCase extends TestCase {
    public void testGetType() {
        assertTrue(TypeHelper.INSTANCE.getType(List.class) instanceof commonj.sdo.Type);
    }
}


-- 
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] Commented: (TUSCANY-1436) TypeHelper.getType(java.util.List.class) throws ClassCastException

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512949 ] 

Fuhwei Lwo commented on TUSCANY-1436:
-------------------------------------

The best spec section I can find is Section 8.1 that maps Java List<String> type to SDO Strings type. If this is acceptable, we can add a new mapping to the javaToSdoMappings table in the SDOHelperBase.java

> TypeHelper.getType(java.util.List.class) throws ClassCastException
> ------------------------------------------------------------------
>
>                 Key: TUSCANY-1436
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1436
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
>            Reporter: Raymond Feng
>            Priority: Critical
>
> The following simple test case fails:
> package org.apache.tuscany.sdo.test;
> import java.util.List;
> import junit.framework.TestCase;
> import commonj.sdo.helper.TypeHelper;
> /**
>  * @version $Rev$ $Date$
>  */
> public class TypeHelperTestCase extends TestCase {
>     public void testGetType() {
>         assertTrue(TypeHelper.INSTANCE.getType(List.class) instanceof commonj.sdo.Type);
>     }
> }

-- 
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-1436) TypeHelper.getType(java.util.List.class) throws ClassCastException

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

Kelvin Goodson resolved TUSCANY-1436.
-------------------------------------

    Resolution: Fixed

I added a test case which demonstrates that the fix for TUSCANY-1110 has resolved this issue

> TypeHelper.getType(java.util.List.class) throws ClassCastException
> ------------------------------------------------------------------
>
>                 Key: TUSCANY-1436
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1436
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
>            Reporter: Raymond Feng
>            Priority: Critical
>
> The following simple test case fails:
> package org.apache.tuscany.sdo.test;
> import java.util.List;
> import junit.framework.TestCase;
> import commonj.sdo.helper.TypeHelper;
> /**
>  * @version $Rev$ $Date$
>  */
> public class TypeHelperTestCase extends TestCase {
>     public void testGetType() {
>         assertTrue(TypeHelper.INSTANCE.getType(List.class) instanceof commonj.sdo.Type);
>     }
> }

-- 
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] Commented: (TUSCANY-1436) TypeHelper.getType(java.util.List.class) throws ClassCastException

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513115 ] 

Fuhwei Lwo commented on TUSCANY-1436:
-------------------------------------

I have uploaded a patch to TUSCANY-1110 to return null if a Java class is not a valid SDO type to take care of this problem.

> TypeHelper.getType(java.util.List.class) throws ClassCastException
> ------------------------------------------------------------------
>
>                 Key: TUSCANY-1436
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1436
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
>            Reporter: Raymond Feng
>            Priority: Critical
>
> The following simple test case fails:
> package org.apache.tuscany.sdo.test;
> import java.util.List;
> import junit.framework.TestCase;
> import commonj.sdo.helper.TypeHelper;
> /**
>  * @version $Rev$ $Date$
>  */
> public class TypeHelperTestCase extends TestCase {
>     public void testGetType() {
>         assertTrue(TypeHelper.INSTANCE.getType(List.class) instanceof commonj.sdo.Type);
>     }
> }

-- 
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] Commented: (TUSCANY-1436) TypeHelper.getType(java.util.List.class) throws ClassCastException

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

Kelvin Goodson commented on TUSCANY-1436:
-----------------------------------------

Please assist me in saving time addressing this issue by providing a reference to the section in the spec which underpins this assertion.

> TypeHelper.getType(java.util.List.class) throws ClassCastException
> ------------------------------------------------------------------
>
>                 Key: TUSCANY-1436
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1436
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
>            Reporter: Raymond Feng
>            Priority: Critical
>
> The following simple test case fails:
> package org.apache.tuscany.sdo.test;
> import java.util.List;
> import junit.framework.TestCase;
> import commonj.sdo.helper.TypeHelper;
> /**
>  * @version $Rev$ $Date$
>  */
> public class TypeHelperTestCase extends TestCase {
>     public void testGetType() {
>         assertTrue(TypeHelper.INSTANCE.getType(List.class) instanceof commonj.sdo.Type);
>     }
> }

-- 
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-1436) TypeHelper.getType(java.util.List.class) throws ClassCastException

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

Kelvin Goodson updated TUSCANY-1436:
------------------------------------

    Fix Version/s: Java-SDO-1.0

> TypeHelper.getType(java.util.List.class) throws ClassCastException
> ------------------------------------------------------------------
>
>                 Key: TUSCANY-1436
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1436
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
>            Reporter: Raymond Feng
>            Priority: Critical
>             Fix For: Java-SDO-1.0
>
>
> The following simple test case fails:
> package org.apache.tuscany.sdo.test;
> import java.util.List;
> import junit.framework.TestCase;
> import commonj.sdo.helper.TypeHelper;
> /**
>  * @version $Rev$ $Date$
>  */
> public class TypeHelperTestCase extends TestCase {
>     public void testGetType() {
>         assertTrue(TypeHelper.INSTANCE.getType(List.class) instanceof commonj.sdo.Type);
>     }
> }

-- 
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] Commented: (TUSCANY-1436) TypeHelper.getType(java.util.List.class) throws ClassCastException

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513068 ] 

Raymond Feng commented on TUSCANY-1436:
---------------------------------------

>From the raw java class (List.class), we cannot tell if it's List<String>. So it's up to you to decide what SDO type to return.

The test case might be a bit misleading because I don't really expect to get a SDO type back from any java class. A null instead of ClassCastException would be good enough.

Thanks,
Raymond



> TypeHelper.getType(java.util.List.class) throws ClassCastException
> ------------------------------------------------------------------
>
>                 Key: TUSCANY-1436
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1436
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
>            Reporter: Raymond Feng
>            Priority: Critical
>
> The following simple test case fails:
> package org.apache.tuscany.sdo.test;
> import java.util.List;
> import junit.framework.TestCase;
> import commonj.sdo.helper.TypeHelper;
> /**
>  * @version $Rev$ $Date$
>  */
> public class TypeHelperTestCase extends TestCase {
>     public void testGetType() {
>         assertTrue(TypeHelper.INSTANCE.getType(List.class) instanceof commonj.sdo.Type);
>     }
> }

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