You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <vg...@yahoo.com> on 2001/07/05 03:27:05 UTC
To ClassUtils experts :)
Dear cocooners,
After reading "performance issues under Mac OS X", I would like to
do small change to ClassUtils, however do not know whould this change
have any side effect or not. The change is in one line:
------------------------------------------------------
String basename = className.substring(className.lastIndexOf(".") + 1);
- File file = new File(directory.getCanonicalPath() + File.separator + basename + ".class");
+ File file = new File(directory, basename + ".class");
return file.lastModified();
------------------------------------------------------
PS: This works for me (Win + JDK1.3)
Thanks,
Vadim
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: To ClassUtils experts :)
Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 5 Jul 2001, Stuart Roebuck wrote:
> I'm not a ClassUtils expert, but seeing as getCanonicalPath optimization
> is important to me I feel I should encourage this thread!
>
> As far as I can see there shouldn't be any need for getCanonicalPath() in
> this method, however, I'm not sure that ClassUtils.lastModified is used by
> Cocoon at the moment, it also doesn't seem to match its description,
> because it only checks the modification of a class file, not a class
> within a library (I presume this means .jar) file.
i concur, there should be no reason to do this:
File file = new File(directory.getCanonicalPath() + File.separator + bas
ename + ".class");
instead of simply this:
File file = new File(directory,basename+".class");
anyone disagree?
- donald
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: To ClassUtils experts :)
Posted by Stuart Roebuck <st...@adolos.co.uk>.
I'm not a ClassUtils expert, but seeing as getCanonicalPath optimization
is important to me I feel I should encourage this thread!
As far as I can see there shouldn't be any need for getCanonicalPath() in
this method, however, I'm not sure that ClassUtils.lastModified is used by
Cocoon at the moment, it also doesn't seem to match its description,
because it only checks the modification of a class file, not a class
within a library (I presume this means .jar) file.
Stuart.
On Thursday, July 5, 2001, at 02:27 am, Vadim Gritsenko wrote:
> Dear cocooners,
>
> After reading "performance issues under Mac OS X", I would like to
> do small change to ClassUtils, however do not know whould this change
> have any side effect or not. The change is in one line:
> ------------------------------------------------------
> String basename =
> className.substring(className.lastIndexOf(".") + 1);
>
> - File file = new File(directory.getCanonicalPath() +
> File.separator + basename + ".class");
> + File file = new File(directory, basename + ".class");
>
> return file.lastModified();
> ------------------------------------------------------
>
> PS: This works for me (Win + JDK1.3)
>
> Thanks,
> Vadim
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
-------------------------------------------------------------------------
Stuart Roebuck stuart.roebuck@adolos.com
Lead Developer Java, XML, MacOS X, XP, etc.
ADOLOS <http://www.adolos.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org