Velocity
  1. Velocity
  2. VELOCITY-453

[PATCH] Fix IntrospectionCacheData caching

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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.

      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:
            Will Glass-Husain
            Reporter:
            Alexey Panchenko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development