Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-8441

GenericConversionService#findConverterForClassPair(TypeDescriptor sourceType, TypeDescriptor targetType) does not check the complete type hierarchy

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.0.4, 3.0.5, 3.1 M1, 3.1 M2
    • Fix Version/s: None
    • Component/s: Core

      Description

      Hi,

      I am trying to integrate jpasecurity project and I think we have found a bug in GenericConversionService#findConverterForClassPair(TypeDescriptor sourceType, TypeDescriptor targetType).

      Basically classQueue accumulates all possible classes that Spring will try to find a converter for. Instead of accumulating java.lang.Object as one of the possibilities it stores jpasecurity SecureObject because that is the inmediate superclass of the secured JPA Entity. Once it cannot find a converter it will cache that situation forever like this key:

      ConverterCacheKey [sourceType = [TypeDescriptor com.nestorurquiza.model.InstrumentTraded$$EnhancerByCGLIB$$114fa3ec], targetType = [TypeDescriptor java.lang.String]]=NO_MATCH

      From that moment on it will never rescan to find a converter. I use Binding to make my JSP list the content of the particular entity but the page will never render complete (it starts rendering but an exception will be triggered whenever the object is attempted to be bound in the JSP)

      You can find the whole thread in https://sourceforge.net/projects/jpasecurity/forums/forum/790334/topic/4563054.

      Thanks!
      -Nestor Urquiza

        Attachments

          Activity

            People

            • Assignee:
              kdonald Keith Donald
              Reporter:
              nestor Nestor Urquiza
              Last updater:
              Spring Issuemaster
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                40 weeks, 1 day ago