Menu

#3 JDK's JavaBeans PropertyDescriptor does not work reliably

open
None
5
2009-12-04
2009-03-18
mus1876
No

The JDK JavaBeans PropertyDescriptor that is used by the JSONSerializer and ObjectBinder FlexJSON classes does not return a read method (accessor/getter) in the following cases:

- The Getter-method has a generic signature of the form "T get<Property>()".

- The Getter-metohod has a signature of the form "Boolean is<Property>()". With type primitive "boolean" it just works fine.

Attached source code that fixes these shortcomings via plain use of Java Reflection API.

Discussion

  • mus1876

    mus1876 - 2009-03-18

    Fixed version of JSONSerializer and ObjectBinder

     
  • mus1876

    mus1876 - 2009-03-18

    Also fixes [2613158]

     
  • Charlie Hubbard

    Charlie Hubbard - 2009-12-04

    I think Introspector's time has come to an end. Unfortunately, using Introspector means you can't run this on Android because it doesn't contain that class. So, if there are problems with this class I'd like to replace it so we get more portability. This patch just patches up the problem, but I think I'd like to take the time and convert to a more portable solution while fixing these problems. Thanks for the patch.

     
  • Charlie Hubbard

    Charlie Hubbard - 2009-12-04
    • assigned_to: nobody --> charliehubbard
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.