Bug 175637 NPE when input parameter to document in ReportRunner.[0600]
Description: NPE when input parameter to document in ReportRunner. Build number:2.2.0.v200702251739-M5-rebuild Steps to reproduce: 1. Unzip birt runtime package to get ReportEngine folder. 2. Copy attached report into the folder. 3. Run command as genReport -m run -p "sample=sample" -p "Cust=200" test1.rptdesign genReport -m render -p "sample=sample" -p "Cust=200" test1.rptdocument Expected result: In the second command, document need no parameters input, so just ignore the input parameter values. Actual result: NPE is thrown out. Error log: SEVERE: exception in parsing the paramters java.lang.NullPointerException at org.eclipse.birt.report.engine.api.ReportRunner.renderReport(ReportRu nner.java:304) at org.eclipse.birt.report.engine.api.ReportRunner.execute(ReportRunner. java:157) at org.eclipse.birt.report.engine.api.ReportRunner.main(ReportRunner.jav a:117)
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/ReportRunner.java
switch ( type )
		{
			case IScalarParameterDefn.TYPE_BOOLEAN :
				return DataTypeUtil.toBoolean( value );
			case IScalarParameterDefn.TYPE_DATE_TIME :
				return DataTypeUtil.toDate( value );
			case IScalarParameterDefn.TYPE_DECIMAL :
				return DataTypeUtil.toBigDecimal( value );
			case IScalarParameterDefn.TYPE_FLOAT :
				return DataTypeUtil.toDouble( value );
			case IScalarParameterDefn.TYPE_STRING :
				return DataTypeUtil.toString( value );
			
			case IScalarParameterDefn.TYPE_INTEGER :
				return DataTypeUtil.toInteger( value );
		}
		return null;
	}
	/**
	 * If -o (targetFile) is not specified, assume same directory as inputfile,
	 * and inputfile.*** as output file name (where *** is the output format.
	 * 
	 * If -o specifies a directory, assume the file name is the same as
	 * inputfile.***.
	 * 
	 * If -o specifies a file, it has a path part and a filename part. Take the
	 * path as the directory to store the file and other resources (for example
	 * image).
	 */
	protected void checkTargetFileName( )