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
System.out.println( "\t --locale /-l<locale>" ); 
		System.out.println( "\t --parameter/-p <parameterName=parameterValue>" ); 
		System.out.println( "\t --file/-F <parameter file>" ); 
		System.out.println( "\nLocale: default is english\n" ); 
		System.out
				.println( "\nparameters in command line will overide parameters in parameter file" ); 
		System.out
				.println( "\nparameter name can't include characters such as ' ', '=', ':' " ); 
		System.out.println( "For RENDER mode:" );
		System.out.println( "\t we should add it in the end<design file>" ); 
		System.out.println( "\t --output/-o <target file>" ); 
		System.out.println( "\\t --page/-p <pageNumber>" );
		System.out.println( "\t --locale /-l<locale>" ); 
		System.out.println( "\nLocale: default is english\n" ); 
	}
	/**
	 * Private function to convert a locale name string to a locale object
	 * 
	 * @param locale -
	 *            locale name string
	 * @return A locale object
	 */
	private Locale getLocale( String locale )
	{
		int index = locale.indexOf( '_' );
		if ( index != -1 )
		{
			
			String language = locale.substring( 0, index );
			String country = locale.substring( index + 1 );