Bug 178947 ClassCastException for emitter render option
In current engine code, it assumes all emitter render option is an IRenderOption instance, actually from the api: EngineConfig.setEmitterConfiguration( String format, Object emitterConfig ), it doesn't reflect this requirement, this implicity allows user to user its own render option object type, for example, HashMap, String or other classes. Actually I think this emitterConfig object is supposed to be passed to concrete emitter directly and interpreted by the concrete emitter only, normally it should not be processed by the engine. Even if engine need some special logic for built-in emitter like html,pdf, it should always check this instance type before processing. ===================================================================== java.lang.ClassCastException: java.util.HashMap at org.eclipse.birt.report.engine.api.impl.EngineTask.setupRenderOption(EngineTask.java:1134) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:142) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:125)
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/EngineConfig.java
*            a file name with date and time to the directory name (e.g.
	 *            C:\Log\BIRT_Engine_2005_02_26_11_26_56.log).
	 * @param level
	 *            the engine log level
	 */
	public void setLogConfig( String directoryName, Level level )
	{
		setProperty( LOG_DESTINATION, directoryName );
		setProperty( LOG_LEVEL, level );
	}
	/**
	 * set the logger used by the report engine.
	 * 
	 * the logger will overides the setLogConfig().
	 * 
	 * @param logger
	 */
	public void setLogger( Logger logger )
	{
		if ( logger == null )
		{
			throw new NullPointerException( "logger can't be NULL" );
		}
		setProperty( ENGINE_LOGGER, logger );
	}
	/**
	 * return the user's logger set through setLogger.
	 * 
	 * @return the logger setted by user. NULL if the user doesn't set it.
	 */