You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2005/06/30 07:50:08 UTC

DO NOT REPLY [Bug 35558] New: - Change legacy HashTable and Vector instances to Map and List (resourceloader)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35558>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35558

           Summary: Change legacy HashTable and Vector instances to Map and
                    List (resourceloader)
           Product: Velocity
           Version: 1.5
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Source
        AssignedTo: velocity-dev@jakarta.apache.org
        ReportedBy: mailmur@yahoo.com


From: Mailmur
org\apache\velocity\runtime\resource\loader\FileResourceLoader.java
This class uses Vector and Hashtable instances to store cached paths values.
Should this and other classes be converted to use ArrayList and HashMap
instances? I think ArrayList+Hashmap give better runtime performance.

From: Will
Thanks for catching this.  Better yet, good modern practice would also be to
declare the variables as List and Map. If you'd care to issue a bug report at
http://issues.apache.org (use BugZilla until we switch to JIRA) this can get
tracked.  If you're feeling ambitious, download svn, get the source and create a
patch.  If "ant test" passes I'll commit it straight away.

Slight offtopic, see enhancement: #21582
It uses hashmap and arraylist as an internal members.

I (mailmur) could fix this, but first I must install Subversion client and study
creating a patch first. Never done both before. Will keep you posted.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org