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
/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.engine.api;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.eclipse.birt.core.framework.IPlatformContext;
import org.eclipse.birt.core.framework.PlatformConfig;
import org.eclipse.birt.report.model.api.IResourceLocator;
/**
 * Wraps around configuration settings for report engine. Allows developers to
 * specify where to look for engine plugins, data drivers, and where to write
 * image files. Allows users to customize data-related properties (i.e., data
 * engine). Also allows engine to provide customized implementations for image
 * handling, hyperlink handling and font handling, etc.
 */
public class EngineConfig extends PlatformConfig implements IEngineConfig