<collection> does not work with java.util.SortedSet
---------------------------------------------------

         Key: JIBX-75
         URL: http://jira.codehaus.org/browse/JIBX-75
     Project: JiBX
        Type: Bug
  Components: core  
    Versions: CVS    
 Environment: JDK 1.5.0_03
 Reporter: Andreas Brenk
 Attachments: SortedSetContainer.java, SortedSetElement.java, SortedSetTest.java

Using java.util.SortedSet for fields and mapping them using <collection> does 
not work. It produces the following errors:

Error: add-method add not found in class java.util.SortedSet for collection 
element at (line 3, col 40, in bindingSortedSet0.xml)
Error: iter-method iterator not found in class java.util.SortedSet for 
collection element at (line 3, col 40, in bindingSortedSet0.xml)

I could already pinpoint the problem:

org.jibx.binding.classes.ClassFile line 903 (Method[] methods = 
m_curClass.getMethods();) returns an array containing only the six methods 
directly defined by the java.util.SortedSet interface and not the methods of 
its super interface java.util.Set (amongst others add(Object) and 
iterator()...). So JiBX does not find a match and continues with the 
superclass. But m_superclass is java.lang.Object, so no match there either.

I guess the bug is m_superclass being java.lang.Object instead of java.util.Set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to