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





------- Additional Comments From [EMAIL PROTECTED]  2005-07-01 08:59 -------
Vector paths: paths to search for templates
Hashtable templatePaths: templateName=cachedPath value pair.

*public init: 
I think is not concurrently run, no problem.

*public synchronized getResourceStream(templateName): 
Method is synchronized, but after analysing more should synchronize
"templatepaths.put(templateName, path)" method only within pathsLoop block. Code
then returns from the method after calling a put method. 

*private findTemplate(path, templateName): 
no problem, used by getResourceStream method only within "pathsLoop" and
actually does not use any shared resources.

*public isSourceModified(resource): 
uses templatePaths.get(name) method once, uses paths.get(idx) method once.
Should synchronize tempatePaths.getter method, nothing more.

*public getLastModified(resource: 
uses templatePaths.get(name) method once. Should synchronize tempatePaths.getter
method, nothing more.

*rscv instance variable:  uses here and there for logging methods. Loggers
handle own synchronization so no need worry about thread conflicts here.

paths variable is never modified after initialization, so is perfectly safe to
use ArrayList instance without any synchronization.
--
So, templatePaths is modified only once within "pathsLoop" block. No need to
synchronized anything else but three times explicit synchronized call. I was
still thinking about using "this" as a lock object when accessing
templatePaths.get or templatePaths.put methods.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to