You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Dondi Imperial <di...@exist.com> on 2004/09/23 23:04:05 UTC

(Noob alert) Bug in ToolsJarHack.java?

Hello everyone. I'm new here so please be gentle if I am wrong :). I 
think there is a bug in 
org.apache.geronimo.system.main.ToolsJarHack.findToolsJarFile().
The line:

log.warn("Could not all find java compiler: tools.jar file not found at 
" + toolsJarFile.getAbsolutePath() +
                " or " + toolsJarFile.getParentFile().getAbsolutePath());

this will only be reached if toolsJarFile is null (there is a check to 
see if it is != null and it will return this value)  but here the code 
is calling getAbsolutePat and getParentFile on a null object. This will 
cause a NullPointerException everytime.

HTH,

Dondi Imperial     


Re: (Noob alert) Bug in ToolsJarHack.java?

Posted by Dain Sundstrom <ds...@gluecode.com>.
That has already been fixed in the source tree.

-dain

--
Dain Sundstrom
Chief Architect
Gluecode Software
310.536.8355, ext. 26

On Sep 23, 2004, at 2:04 PM, Dondi Imperial wrote:

> Hello everyone. I'm new here so please be gentle if I am wrong :). I 
> think there is a bug in 
> org.apache.geronimo.system.main.ToolsJarHack.findToolsJarFile().
> The line:
>
> log.warn("Could not all find java compiler: tools.jar file not found 
> at " + toolsJarFile.getAbsolutePath() +
>                " or " + 
> toolsJarFile.getParentFile().getAbsolutePath());
>
> this will only be reached if toolsJarFile is null (there is a check to 
> see if it is != null and it will return this value)  but here the code 
> is calling getAbsolutePat and getParentFile on a null object. This 
> will cause a NullPointerException everytime.
>
> HTH,
>
> Dondi Imperial