Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-384

ConvertUtilsBean unable to process javassist classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.3
    • 2.0.0
    • None

    Description

      The ConvertUtils uses ConvertUtils.register(userConverter , User.class) to register a converter.
      And use converters.get(clazz) in Converter.lookup() to find proper converter.
      It won't work for javassist modified object .
      for example , the User.class runtime becomes User_$$_javassist_0.class , and Converter is unable to find the corresponding converter.

      So , I suggest the future version can loop the converters map , and use User.class.isAssignableFrom(clazz_in_map) to find corresponding converter.

      Attachments

        1. ConvertUtilsBean.java
          38 kB
          smallufo

        Activity

          People

            Unassigned Unassigned
            smallufo smallufo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: