[ 
http://issues.apache.org/jira/browse/VELOCITY-453?page=comments#action_12433363 
] 
            
Henning Schmiedehausen commented on VELOCITY-453:
-------------------------------------------------

attachments seem to work now. Henri has discovered that you uploaded your files 
with trailing blanks on the file names and that confused JIRA. Please don't use 
trailing blanks on file names (I consider this a JIRA bug BTW).

Some comments on your patches (I checked  the v2-retry.patch because it has the 
feather):

- You seem to use some Windows tool. The diffs have ^M line endings for the 
diff generated lines.

- equals should at least do a if (o == this) return true; check. This short 
cuts the equals() method in case you test against yourself (set insert e.g.)

- I'd love to have unit tests for hashCode() and equals(). 

- There is a potential NPE with params == null in hashCode() and equals()





> [PATCH] Fix IntrospectionCacheData caching
> ------------------------------------------
>
>                 Key: VELOCITY-453
>                 URL: http://issues.apache.org/jira/browse/VELOCITY-453
>             Project: Velocity
>          Issue Type: Bug
>          Components: Source
>    Affects Versions: 1.5
>            Reporter: Alexey Panchenko
>         Assigned To: Will Glass-Husain
>             Fix For: 1.5
>
>         Attachments: ASTMethod_IntrospectionCacheData_cache, 
> ASTMethod_IntrospectionCacheData_cache-v2-retry.patch, 
> ASTMethod_IntrospectionCacheData_cache-v2.patch, 
> IntrospectionCacheDataTest-no-copyright.java, 
> IntrospectionCacheDataTest-no-copyright.java, 
> IntrospectionCacheDataTest-v4.java, IntrospectionCacheDataTest.java
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to