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

[PATCH] Fix IntrospectionCacheData caching

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5
    • Component/s: Engine
    • Labels:
      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. IntrospectionCacheDataTest-v4.java
          1 kB
          Alexey Panchenko
        2. IntrospectionCacheDataTest-no-copyright.java
          1 kB
          Alexey Panchenko
        3. IntrospectionCacheDataTest-no-copyright.java
          1 kB
          Alexey Panchenko
        4. ASTMethod.java.patch2006-09-28
          2 kB
          Alexey Panchenko
        5. ASTMethod_IntrospectionCacheData_cache-v2-retry.patch
          3 kB
          Alexey Panchenko
        6. ASTMethod_IntrospectionCacheData_cache-v2.patch
          3 kB
          Alexey Panchenko
        7. ASF.LICENSE.NOT.GRANTED--IntrospectionCacheDataTest.java
          2 kB
          Alexey Panchenko
        8. ASF.LICENSE.NOT.GRANTED--ASTMethod_IntrospectionCacheData_cache
          3 kB
          Alexey Panchenko

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: