Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1736

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0-beta1
    • 2.5.0-beta1
    • Java
    • 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.

      Attachments

        1. SHINDIG-1736.patch
          2 kB
          Doug Davies

        Activity

          People

            Unassigned Unassigned
            csddavies Doug Davies
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: