jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. B. Rainsberger" <jbra...@rogers.com>
Subject Re: Code Review (Re: "You must either set location or path on <pathelement>" Exception Message)
Date Sat, 29 Nov 2003 10:54:37 GMT
Vincent Massol wrote:

> 
>>-----Original Message-----
>>From: J. B. Rainsberger [mailto:jbrains@rogers.com]
>>Sent: 28 November 2003 23:55
>>To: Cactus Users List
>>Subject: Code Review (Re: "You must either set location or path on
>><pathelement>" Exception Message)
>>
>>Vincent Massol wrote:
>>
>>
>>>        File toolsJar = new File(javaHome + "/../lib/tools.jar");
>>
>>I think this could and /should/ be
>>
>>     new File(javaHome, "../lib/tools.jar");
> 
> 
> Are you confident javaHome will always contain a trailing "/"?

No. That's the point of using 'new File(directory, relativePath)'. The 
nice Java folks have already worried about trailing slash or not 
trailing slash. Why should /we/ worry about it?

> In any case, I think this whole section should be rewritten as it does
> not support MAC OS and we could verify whether tools.jar is already in
> the executing classloaders and take it from there if it is (not sure how
> easy it is).

Fair enough. I just saw a simple improvement. :)
-- 
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand


Mime
View raw message