Bug 173836 NPE was thrown when click "Preview " button quickly twice[00]
NPE was thrown when click "Preview " button quickly twice[00] Build number: 2.2.0.v20070212-0630 Steps to reproduce: 1.open attached report 2.click "Preview" button quickly twice Expected result: Report can be previewed properly Actual result: NPE was thrown in second preview Error log: see screen shot
viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/presentation/aggregation/layout/FramesetFragment.java
return ParameterAccessor.PARAM_FORMAT_HTML.equalsIgnoreCase( bean
				.getFormat( ) );
	}
	/**
	 * Anything before do service.
	 * 
	 * @param request
	 *            incoming http request
	 * @param response
	 *            http response
	 * @exception ServletException
	 * @exception IOException
	 */
	protected void doPreService( HttpServletRequest request,
			HttpServletResponse response ) throws ServletException, IOException
	{
		String format = ParameterAccessor.getFormat( request );
		if ( ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase( format ) )
		{
			response.setContentType( "application/pdf" ); 
			String filename = ParameterAccessor.generateFileName( request );
			response
					.setHeader(
							"Content-Disposition", "inline; filename=\"" + filename + "\"" ); 
		}
		else
		{
			String mimeType = ReportEngineService.getInstance( ).getMIMEType(
					format );
			if ( mimeType != null && mimeType.length( ) > 0 )