I can confirm the problem; thanks for the patch.

An alternative approach might be to amend recordResult() to handle CSV
output.
In which case sampleOccurred would call recordResult for all output types,
and recordResult does the check for isResultMarked()

Or perhaps calling recordResult would cause something else to break?

-- 
The opinions expressed herein are my own, and are not necessarily endorsed
by my employer ...

-----Original Message-----
From: Jeremy Arnold [mailto:[EMAIL PROTECTED]
Sent: 08 March 2003 17:14
To: JMeter Developers List
Subject: [PATCH] NullPointerException in ResultCollector


Hello,
    In recent builds I've started getting NullPointerExceptions in 
org.apache.jmeter.reporters.ResultCollector.sampleOccurred.  It looks 
like this was caused by the new support for CSV results files.  If the 
save file name is not specified for a visualizer then the output writer 
will be null and the exception occurs.  The original code for outputting 
XML didn't have this problem because it checks to see if the output 
writer is null before writing to it (ResultCollector.recordResult).

    This simple patch solves this problem -- it checks to see if the 
output writer is null before attempting to write to it.

Jeremy Arnold
[EMAIL PROTECTED]
http://xirr.com/~jeremy_a


_________________________________________________________
This email is confidential and intended solely for the use of the 
individual to whom it is addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of 
SchlumbergerSema.
If you are not the intended recipient, be advised that you have received
this email in error and that any use, dissemination, forwarding, printing, 
or copying of this email is strictly prohibited.

If you have received this email in error please notify the
SchlumbergerSema Helpdesk by telephone on +44 (0) 121 627 5600.
_________________________________________________________


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

Reply via email to