Bug 211175 ClassCastException thrown when implementing IReportItemQuery
When implementing IReportItemQuery's method, public IDataQueryDefinition[] createReportQueries(IDataQueryDefinition parent) throws BirtException, even if the impl method returns IDataQueryDefinition[], ClassCastException will be thrown during preview, the error log is as follows: java.lang.ClassCastException: [Lorg.eclipse.birt.data.engine.api.IDataQueryDefinition; at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.generateContent(ExtendedGenerateExecutor.java:91) at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.execute(ExtendedGenerateExecutor.java:72) at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:60) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) If the method returns IBaseQueryDefinition[], it's ok. Look at the engine code, there's something wrong of class casting when generating content.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/presentation/LocalizedContentVisitor.java
{
		return new TemplateExecutor( context ).execute( template, values );
	}
	public Object visitList( IListContent list, Object value)
	{
		if ( list.getGenerateBy( ) instanceof ListItemDesign )
		{
			handleOnRender( list );
		}
		return list;
	}
	public Object visitTable( ITableContent table, Object value )
	{
		handleOnRender( table );
		
		String captionText = table.getCaption( );
		String captionKey = table.getCaptionKey( );
		captionText = localize( table, captionKey, captionText );
		table.setCaption( captionText );
		
		return table;
	}
	public Object visitRow( IRowContent row, Object value )
	{
		handleOnRender( row );
		return row;
	}
	public Object visitCell( ICellContent cell, Object value )
	{
		handleOnRender( cell );