[EMAIL PROTECTED] wrote:
> 
> neeme       01/10/31 09:56:44
> 
>   Modified:    src/java/org/apache/avalon/excalibur/testcase
>                         ExcaliburTestCase.java
>   Log:
>   removed possibility for NPE, in case the .xtest configuration file was not 
> found
>            final String resourceName = this.getClass().getName().replace( 
> '.', '/' ) + ".xtest";
>   -        getLogger().debug("ResourceName = " + resourceName);
>   -        prepare( this.getClass().getClassLoader().getResource( 
> resourceName ).openStream() );
>   +        URL resource = this.getClass().getClassLoader().getResource( 
> resourceName );
>   +        if ( resource != null ) {
>   +            getLogger().debug("Loading resource " + resourceName);
>   +            prepare( resource.openStream() );
>   +        }
>   +        else
>   +            getLogger().debug("Resource not found " + resourceName);
>        }

Be sure to fail() if the resource cannot be found!  It is an error condition.

-- 

"Those who would trade liberty for
 temporary security deserve neither"
                - Benjamin Franklin

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to