Bug 123722 Java based scripting -> getExpressionValue(int i) of IRowData returns unreasonable value
public void onPrepare( IRow row, IReportContext reportContext ) { try { row.setBookmark( "\"row-bookmark\"" ); System.out.println( row.getBookmark( ) ); } catch ( Exception e ) { e.printStackTrace( ); } } public void onCreate(IRowInstance rowInstance, IReportContext reportContext) { try { IRowData rowData = rowInstance.getRowData( ); Object int2 = rowData.getExpressionValue( 1 ); System.out.println( int2 ); } catch ( Exception e ) { e.printStackTrace( ); } } Consider the script above, according to Javadoc, rowData.getExpressionValue( 1 ) will return the first data expr. of the row, i.e. the value of the first column. However, it was noticed that "row-bookmark" was returned instead. And if i used rowData.getExpressionValue( 2 ), then i got the right value. So if it was the correct implementation, it should be clearly stated in Javadoc.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/TableItemExecutor.java
{
			assert cellEmitter != null;
			return cellEmitter;
		}
		public void flush( )
		{
			int rowCount = layout.getRowCount( );
			int colCount = layout.getColCount( );
			for ( int i = 0; i < rowCount; i++ )
			{
				Row row = layout.getRow( i );
				IRowContent rowContent = (IRowContent) row.getContent( );
				emitter.startRow( rowContent );
				for ( int j = 0; j < colCount; j++ )
				{
					Cell cell = row.getCell( j );
					if ( cell.getStatus( ) == Cell.CELL_USED )
					{
						CellContent content = (CellContent) cell.getContent( );
						content.cell.setColumn( cell.getColId( ) );
						content.cell.setRowSpan( cell.getRowSpan( ) );
						content.cell.setColSpan( cell.getColSpan( ) );
						emitter.startCell( content.cell );
						if ( content.buffer != null )
						{
							content.buffer.flush( );
						}
						emitter.endCell( content.cell );
					}
					if ( cell.getStatus( ) == Cell.CELL_EMPTY )