Shindig
  1. Shindig
  2. SHINDIG-1736

JsonUtil throws IllegalArgumentException if the class it is parsing has any duplicate methods

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-beta1
    • Fix Version/s: 2.5.0-beta1
    • Component/s: Java
    • Labels:
      None

      Description

      JsonUtil throws

      java.lang.IllegalArgumentException: duplicate key: value

      if the class it is parsing has duplicate methods caused by synthetic methods creating for generics. For example:

      private class DuplicateBase<type> {
      public type getValue()

      { return null; }

      }

      private class Duplicate extends DuplicateBase<String> {
      public String getValue()

      { return "duplicate"; }

      }

      If the Duplicate Class is parsed by JsonUtil is will blow up.

      This was introduced by revision 1290973. Before that it did not use the guava collection and have this problem.

        Activity

        Doug Davies made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Doug Davies made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.5.0 [ 12315324 ]
        Resolution Fixed [ 1 ]
        Doug Davies made changes -
        Attachment SHINDIG-1736.patch [ 12519278 ]
        Doug Davies made changes -
        Attachment SHINDIG-1736.patch [ 12519288 ]
        Doug Davies made changes -
        Attachment SHINDIG-1736.patch [ 12519278 ]
        Doug Davies made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Doug Davies made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Doug Davies created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Doug Davies
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development