[ 
http://issues.apache.org/jira/browse/TUSCANY-935?page=comments#action_12455266 
] 
            
Kelvin Goodson commented on TUSCANY-935:
----------------------------------------

Working from Yang's patch I've deliberately committed a modified test case 
under a different name "DotNameTest.java" (so that maven wont pick it up) and 
I'm not yet committing the fix since there are a couple of issues.

One is that with the fix applied XPathTestCase fails in testListIndexing with
junit.framework.AssertionFailedError: bad indexing passed
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.assertTrue(Assert.java:20)
        at junit.framework.Assert.assertFalse(Assert.java:34)
        at 
org.apache.tuscany.sdo.test.XPathTestCase.testListIndexing(XPathTestCase.java:106)

The other issue is that there seems to be some inter-TestCase type scope 
interference.  I have altered the new test case to use the HelperContext method 
of getting a type helper in setUp(),  but the interference persists even with 
that change.  

In order to be able to explore this issue in eclipse I have added the test case 
to AllTests.java twice; once at the start of the sequence of tests and once at 
the end. When run at the start of the sequence the new test case runs 
perfectly,  but when run at the end it fails.

You can see that if you run the new test independently then the quote instance 
is an instance of DynamicDataObjectImpl,  but if you ran the test as it was 
provided, in a maven build,  then there is a failure, and it seems that the 
quote instance is now an instance of a generated "Quote" class.

Yang,  if you could investigate the XPathTestCase failure please, I will tyr to 
gain some insight into the type interference issue.


> SDO path accessors need to support names that contain "."
> ---------------------------------------------------------
>
>                 Key: TUSCANY-935
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-935
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>            Reporter: Frank Budinsky
>         Attachments: DataObjectUtil.935, dotNames.xsd, DotNameTestCase.java
>
>
> This issue keeps coming up. The "." character is commonly used in industrial 
> schemas, so we need to make it work. I propose handling it as follows:
> Given a property name like "foo.0":
> 1. first simply check if there is a property with the specified name.
> 2. if a property with that name isn't found, then find the last "." character 
> in the name.
> 3. if it is followed by digits, then use the substring from 0 to the "." as 
> the property name, and the number after the dot as an index.
> The only case this breaks is when there is both an isMany property named 
> "foo" and another property named someting like "foo.0" in the same type. I 
> think this is an unlikely corner case, that we can live with.
> We'll also need to propose this behavior be clarified in the spec.

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

Reply via email to