The engine can be null in a unit test, so check for it

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4923 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2011-01-03 01:00:52 +00:00
parent 75a7d8a76e
commit c51e745bae
1 changed files with 2 additions and 1 deletions

View File

@ -129,7 +129,8 @@ public abstract class TraversalEngine<M,T,WalkerType extends Walker<M,T>,Provide
//
// TODO -- should be controlled by Queue so that .out and .performance.log comes out
//
if ( PERFORMANCE_LOG_ENABLED && performanceLog == null && engine.getArguments().performanceLog != null ) {
if ( PERFORMANCE_LOG_ENABLED && performanceLog == null
&& engine != null && engine.getArguments().performanceLog != null ) {
try {
performanceLog = new PrintStream(new FileOutputStream(engine.getArguments().performanceLog));
performanceLog.println(Utils.join("\t", Arrays.asList("elapsed.time", "units.processed", "processing.speed")));