[ 
https://issues.apache.org/jira/browse/WSCOMMONS-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ajith Harshana Ranabahu resolved WSCOMMONS-24.
----------------------------------------------

    Resolution: Fixed

Fixed and test cases added/modified to test the correct behavior

> Schema "groups" XmlSchemaObjectTable is filled using invalid HashMap keys
> -------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-24
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-24
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: XmlSchema
>         Environment: WS Commons XML Schema 1.0.2
>            Reporter: Peter Hendriks
>
> The XmlSchemaObjectTable  retrieved using XmlSchema.getGroups() is filled in 
> SchemaBuilder by using the package scope collection variable instead of its 
> public API. For groups and attribute groups a key of the wrong type is used 
> (String instead of QName). 
> As a result groups cannot be accessed using the public API, because you can 
> only query using a QName, and the keys are only Strings. As a result groups 
> cannot be read by key and the API is broken.
> The issue can be worked around by using the getValues() method to search 
> through all groups directly.
> This should be very easy to fix and I am willing to provide a patch. The code 
> is riddled with package scoped fields and methods. This is generally bad 
> practice because of these kinds of problems. Please consider refactoring the 
> code to more restrictive field/method scoping to have a cleaner API and 
> prevent errors.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to