Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-453

[PATCH] Fix IntrospectionCacheData caching

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.5
    • Engine
    • None

    Description

      The old code used Class[].hashCode() in MethodCacheKey.hashCode() implementation.
      hashCode() is not overriden for arrays so it returns different value for each array instance.

      The attached is the correct implementation and a test case to prove the caching actually works.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--ASTMethod_IntrospectionCacheData_cache
          3 kB
          Alexey Panchenko
        2. ASF.LICENSE.NOT.GRANTED--IntrospectionCacheDataTest.java
          2 kB
          Alexey Panchenko
        3. ASTMethod_IntrospectionCacheData_cache-v2.patch
          3 kB
          Alexey Panchenko
        4. ASTMethod_IntrospectionCacheData_cache-v2-retry.patch
          3 kB
          Alexey Panchenko
        5. ASTMethod.java.patch2006-09-28
          2 kB
          Alexey Panchenko
        6. IntrospectionCacheDataTest-no-copyright.java
          1 kB
          Alexey Panchenko
        7. IntrospectionCacheDataTest-no-copyright.java
          1 kB
          Alexey Panchenko
        8. IntrospectionCacheDataTest-v4.java
          1 kB
          Alexey Panchenko

        Activity

          People

            wglass William Glass-Husain
            alex+news@olmisoft.com Alexey Panchenko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: