jaxb
  1. jaxb
  2. JAXB-546

Custom IDResolver gets wrong target type with IDREF collections

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.7
    • Fix Version/s: not determined
    • Component/s: runtime
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      546
    • Tags:

      Description

      The issue is described in the forum:
      http://forums.java.net/jive/thread.jspa?threadID=45481&tstart=120

      When using IDREFed collections:

      @XmlIDREF
      Set<Y> ySet;

      the resolve() method of a custom IDResolver gets Object.class as targetType,
      but it should be Y.class. This results on wrong ID resolving.

      If I use an empty derived class instead:

      class YSet extends HashSet<Y> {}
      ...
      @XmlIDREF
      YSet ySet;

      then I get the right targetType in the resolve() method.

        Activity

        Hide
        Iaroslav Savytskyi added a comment -

        Hi,

        I hope I'll be able to fix it in 2.2.8

        Show
        Iaroslav Savytskyi added a comment - Hi, I hope I'll be able to fix it in 2.2.8
        Hide
        realsonic3 added a comment -

        Let me please update you. This bug causes a problem that two or more objects with same ID but different types are unmarshalled as one type.

        Show
        realsonic3 added a comment - Let me please update you. This bug causes a problem that two or more objects with same ID but different types are unmarshalled as one type.
        Hide
        realsonic3 added a comment - - edited

        Any chances it will be fixed in 2.2.8?

        Show
        realsonic3 added a comment - - edited Any chances it will be fixed in 2.2.8?
        Hide
        Iaroslav Savytskyi added a comment -

        We are quite busy with maintenance now. So I can't promise.

        Show
        Iaroslav Savytskyi added a comment - We are quite busy with maintenance now. So I can't promise.
        Hide
        realsonic3 added a comment -

        Hi. Are there any chances to get the issue resolved?..

        Show
        realsonic3 added a comment - Hi. Are there any chances to get the issue resolved?..

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            uryssel
          • Votes:
            7 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: