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

Bridge methods should be ignored when finding property setter methods for JSON serialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0-update1
    • 2.5.1
    • Java
    • None

    Description

      Serializing classes to JSON that implement a generic interface might fail with a message "duplicate key: <name>".

      The problem is that generics add synthetic bridge methods (see http://stas-blogspot.blogspot.nl/2010/03/java-bridge-methods-explained.html ), so there will be two setters for the same property.

      Fix this by skipping bridge methods when searching for properties.

      Attachments

        Activity

          People

            ssievers Stanton Sievers
            ankon Andreas Kohn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: