diff --git a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/CSVDataExtractionImplTest.java b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/CSVDataExtractionImplTest.java index 310dc0ba4b7..7bc3e05ce7e 100644 --- a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/CSVDataExtractionImplTest.java +++ b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/CSVDataExtractionImplTest.java @@ -360,19 +360,14 @@ public void testOutputWithSelectedColumns() throws Exception subtestRegular( option, "testSelectColumns.csv"); //$NON-NLS-1$ } + /* + * Test will ignore the invalid column and output only valid ones without + * exception + */ public void testOutputWithInvalidColumn() throws Exception { option.setSelectedColumns( TEST_INVALID_COLUMNS ); - CSVDataExtractionImpl extract = createExtraction( out, option ); - try - { - extract.output( results ); - fail("The output() method must throw an exception when selecting invalid column names."); //$NON-NLS-1$ - } - catch ( BirtException e ) - { - - } + subtestRegular( option, "testSelectInvalidColumn.csv"); //$NON-NLS-1$ } public void testOutputQuoting() throws Exception diff --git a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDateFormatWithTimeZone.csv b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDateFormatWithTimeZone.csv index f9995d9a1e9..b20a978bf9f 100644 --- a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDateFormatWithTimeZone.csv +++ b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDateFormatWithTimeZone.csv @@ -1,3 +1,3 @@ Any Type Column using DateTime,Any Type Column using Date,Any Type Column using Time,DateTime Column,SQL Date Column,SQL Time Column Any,Any,Any,DateTime,Date,Time -08/08/2008 15:08:08 HMG+08:00,08/08/2008 08:08:08 HMG+01:00,08/08/2008 08:08:08 HMG+01:00,08/08/2008 15:08:08 HMG+08:00,08/08/2008 08:08:08 HMG+01:00,08/08/2008 08:08:08 HMG+01:00 +08/08/2008 15:08:08 UTC+8,08/08/2008 08:08:08 UTC+1,08/08/2008 15:08:08 UTC+8,08/08/2008 15:08:08 UTC+8,08/08/2008 08:08:08 UTC+1,08/08/2008 15:08:08 UTC+8 diff --git a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDefaults.csv b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDefaults.csv index 20ac6cfe53e..6c71af90be2 100644 --- a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDefaults.csv +++ b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testDefaults.csv @@ -1,5 +1,5 @@ -stringColumn,integerColumn,dateColumn,decimalColumn -myString1,5,"Aug 8, 2008 10:30 AM",25.689 -,-12,, -"my,str;in g|3",,"Jan 1, 2007 3:30 PM",-987.654321 -ü你ßé,0,,0.0 +stringColumn,integerColumn,dateColumn,decimalColumn +myString1,5,"Aug 8, 2008 10:30 AM",25.689 +,-12,, +"my,str;in g|3",,"Jan 1, 2007 3:30 PM",-987.654321 +ü你ßé,0,,0 diff --git a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testLocalized.csv b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testLocalized.csv index 933dbd560b7..f66091c0085 100644 --- a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testLocalized.csv +++ b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testLocalized.csv @@ -1,6 +1,6 @@ -stringColumn,integerColumn,dateColumn,decimalColumn -String,Integer,DateTime,Decimal -myString1,5,8 août 2008 10:30,"25,689" -,-12,, -"my,str;in g|3",,1 janv. 2007 15:30,"-987,654321" -ü你ßé,0,,"0,0" +stringColumn,integerColumn,dateColumn,decimalColumn +String,Integer,DateTime,Decimal +myString1,5,8 août 2008 10:30,"25,689" +,-12,, +"my,str;in g|3",,1 janv. 2007 15:30,"-987,654321" +ü你ßé,0,,0 diff --git a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testTimeZone.csv b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testTimeZone.csv index ed6d09f994e..298b97ca22b 100644 --- a/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testTimeZone.csv +++ b/engine/org.eclipse.birt.report.engine.dataextraction.csv.tests/test/org/eclipse/birt/report/engine/dataextraction/csv/testTimeZone.csv @@ -1,3 +1,3 @@ Any Type Column using DateTime,Any Type Column using Date,Any Type Column using Time,DateTime Column,SQL Date Column,SQL Time Column Any,Any,Any,DateTime,Date,Time -8 août 2008 15:08,8 août 2008,08:08:08,8 août 2008 15:08,8 août 2008,08:08:08 +8 août 2008 15:08,8 août 2008,15:08:08,8 août 2008 15:08,8 août 2008,15:08:08 diff --git a/engine/org.eclipse.birt.report.engine.dataextraction/src/org/eclipse/birt/report/engine/dataextraction/impl/CommonDataExtractionImpl.java b/engine/org.eclipse.birt.report.engine.dataextraction/src/org/eclipse/birt/report/engine/dataextraction/impl/CommonDataExtractionImpl.java index 8dd7a552381..e3eb36c05b4 100644 --- a/engine/org.eclipse.birt.report.engine.dataextraction/src/org/eclipse/birt/report/engine/dataextraction/impl/CommonDataExtractionImpl.java +++ b/engine/org.eclipse.birt.report.engine.dataextraction/src/org/eclipse/birt/report/engine/dataextraction/impl/CommonDataExtractionImpl.java @@ -105,7 +105,7 @@ private void initCommonOptions( IReportContext context, { aLocale = commonOptions.getLocale( ); } - else + else if ( context != null ) { aLocale = context.getLocale( ); } @@ -124,10 +124,14 @@ private void initCommonOptions( IReportContext context, // convert java time zone to ICU time zone this.timeZone = TimeZone.getTimeZone( javaTimeZone.getID( ) ); } - else + else if ( context != null ) { timeZone = context.getTimeZone( ); } + else + { + timeZone = TimeZone.getDefault( ); + } if ( !isLocaleNeutral ) {