in commons-digester3-core/src/main/java/org/apache/commons/digester3/plugins/strategies/FinderFromFile.java [87:128]
public RuleLoader findLoader( final Digester d, final Class<?> pluginClass, final Properties p )
throws PluginException
{
final String rulesFileName = p.getProperty( fileNameAttr );
if ( rulesFileName == null )
{
// nope, user hasn't requested dynamic rules to be loaded
// from a specific file.
return null;
}
InputStream is;
try
{
is = new FileInputStream( rulesFileName );
}
catch ( final IOException ioe )
{
throw new PluginException( "Unable to process file [" + rulesFileName + "]", ioe );
}
try
{
return new LoaderFromStream( is );
}
catch ( final Exception e )
{
throw new PluginException( "Unable to load xmlrules from file [" + rulesFileName + "]", e );
}
finally
{
try
{
is.close();
}
catch ( final IOException ioe )
{
throw new PluginException( "Unable to close stream for file [" + rulesFileName + "]", ioe );
}
}
}