Bug 137817 NPE while generating PDF report
Got this excecption when generating a big PDF report. The PDF report fails and a browser error page is displayed: WARNING: D:\workspaces\runtime-workspace\.metadata\.plugins\com.ibm.xtools.analysis.reporting\reports\codereview_severity_summary\codereview_severity_summary.pdf (The system cannot find the path specified) java.io.FileNotFoundException: D:\workspaces\runtime-workspace\.metadata\.plugins\com.ibm.xtools.analysis.reporting\reports\codereview_severity_summary\codereview_severity_summary.pdf (The system cannot find the path specified) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:201) at java.io.FileOutputStream.<init>(FileOutputStream.java:153) at org.eclipse.birt.report.engine.emitter.pdf.PDFEmitter.initialize(PDFEmitter.java:186) at org.eclipse.birt.report.engine.layout.impl.ReportLayoutEngine.initialize(ReportLayoutEngine.java:381) at org.eclipse.birt.report.engine.presentation.WrappedEmitter.initialize(WrappedEmitter.java:44) at org.eclipse.birt.report.engine.presentation.LocalizedEmitter.initialize(LocalizedEmitter.java:129) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.createContentEmitter(RunAndRenderTask.java:145) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:174) at com.ibm.xtools.analysis.reporting.internal.editor.ReportEditor$1.runInWorkspace(ReportEditor.java:167) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFEmitter.java
{
 			for (Iterator it=dbl.iterator(); it.hasNext();)
 			{
 				BorderInfo bi = (BorderInfo)it.next();
 				int outerBorderWidth=bi.borderWidth/3, innerBorderWidth=bi.borderWidth/3;
 				
 				switch (bi.borderType)
 				{
 				case BorderInfo.TOP_BORDER:
 					drawLine( layoutPointX2PDF( bi.startX ), layoutPointY2PDF( bi.startY-bi.borderWidth/2+outerBorderWidth/2 ), 
 	 						layoutPointX2PDF( bi.endX ), layoutPointY2PDF( bi.endY-bi.borderWidth/2+outerBorderWidth/2 ), 
 	 						pdfMeasure(outerBorderWidth), bi.borderColor, "solid", cb ); 
 	 				drawLine( layoutPointX2PDF( bi.startX+2*borders[BorderInfo.LEFT_BORDER].borderWidth/3 ), 
 	 						layoutPointY2PDF( bi.startY+bi.borderWidth/2-innerBorderWidth/2 ), 
 	 						layoutPointX2PDF( bi.endX-2*borders[BorderInfo.RIGHT_BORDER].borderWidth/3 ), 
 	 						layoutPointY2PDF( bi.endY+bi.borderWidth/2-innerBorderWidth/2 ), 
 	 						pdfMeasure(innerBorderWidth), bi.borderColor, "solid", cb ); 
 	 				break;
 				case BorderInfo.RIGHT_BORDER:
 					drawLine( layoutPointX2PDF( bi.startX+bi.borderWidth/2-outerBorderWidth/2 ), layoutPointY2PDF( bi.startY ), 
 	 						layoutPointX2PDF( bi.endX+bi.borderWidth/2-outerBorderWidth/2 ), layoutPointY2PDF( bi.endY ), 
 	 						pdfMeasure(outerBorderWidth), bi.borderColor, "solid", cb ); 
 	 				drawLine( layoutPointX2PDF( bi.startX-bi.borderWidth/2+innerBorderWidth/2 ), 
 	 						layoutPointY2PDF( bi.startY+2*borders[BorderInfo.TOP_BORDER].borderWidth/3 ), 
 	 						layoutPointX2PDF( bi.endX-bi.borderWidth/2+innerBorderWidth/2 ), 
 	 						layoutPointY2PDF( bi.endY-2*borders[BorderInfo.BOTTOM_BORDER].borderWidth/3 ), 
 	 						pdfMeasure(innerBorderWidth), bi.borderColor, "solid", cb ); 
 	 				break;
 				case BorderInfo.BOTTOM_BORDER:
 					drawLine( layoutPointX2PDF( bi.startX ), layoutPointY2PDF( bi.startY+bi.borderWidth/2-outerBorderWidth/2 ),