[ 
https://issues.apache.org/jira/browse/SHINDIG-1736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230355#comment-13230355
 ] 

[email protected] commented on SHINDIG-1736:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4366/
-----------------------------------------------------------

Review request for shindig and Paul Lindner.


Summary
-------

This is a fix for SHINDIG-1736.  Currently the recently updated JsonUtil blows 
up if the class it is trying to parse has synthetic methods generated by the 
compiler for handling runtime generics substitution.  It now checks to make 
sure the method is not synthetic.  I've included a unit test that tests this 
scenario.


This addresses bug SHINDIG-1736.
    https://issues.apache.org/jira/browse/SHINDIG-1736


Diffs
-----

  /trunk/java/common/src/main/java/org/apache/shindig/common/JsonUtil.java 
1299867 
  /trunk/java/common/src/test/java/org/apache/shindig/common/JsonUtilTest.java 
1299867 

Diff: https://reviews.apache.org/r/4366/diff


Testing
-------

unit test provided


Thanks,

Doug


                
> JsonUtil throws IllegalArgumentException if the class it is parsing has any 
> duplicate methods
> ---------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1736
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1736
>             Project: Shindig
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 2.5.0
>            Reporter: Doug Davies
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to