| author | pshi | 2012-05-09 01:30:32 (EDT) |
|---|---|---|
| committer | mwu | 2012-05-09 01:30:32 (EDT) |
| commit | 6c083fc023ed9458fa94437373a89ecf01ce283e (patch) (side-by-side diff) | |
| tree | ed092c2f7fc876f85e92cb01c025270d21c85e13 | |
| parent | f0e979296d68fcb554f74b8143278095e8e09059 (diff) | |
| download | org.eclipse.birt-6c083fc023ed9458fa94437373a89ecf01ce283e.zip org.eclipse.birt-6c083fc023ed9458fa94437373a89ecf01ce283e.tar.gz org.eclipse.birt-6c083fc023ed9458fa94437373a89ecf01ce283e.tar.bz2 | |
fix 49758 Exception is thrown out when edit a data set whose data source
is invalid
| -rw-r--r-- | data/org.eclipse.birt.report.data.oda.excel.ui/src/org/eclipse/birt/report/data/oda/excel/ui/wizards/ExcelFileSelectionWizardPage.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/data/org.eclipse.birt.report.data.oda.excel.ui/src/org/eclipse/birt/report/data/oda/excel/ui/wizards/ExcelFileSelectionWizardPage.java b/data/org.eclipse.birt.report.data.oda.excel.ui/src/org/eclipse/birt/report/data/oda/excel/ui/wizards/ExcelFileSelectionWizardPage.java index f28e15c..5bbeae8 100644 --- a/data/org.eclipse.birt.report.data.oda.excel.ui/src/org/eclipse/birt/report/data/oda/excel/ui/wizards/ExcelFileSelectionWizardPage.java +++ b/data/org.eclipse.birt.report.data.oda.excel.ui/src/org/eclipse/birt/report/data/oda/excel/ui/wizards/ExcelFileSelectionWizardPage.java @@ -228,10 +228,10 @@ public class ExcelFileSelectionWizardPage extends DataSetWizardPage implements return; // nothing to initialize String queryText = dataSetDesign.getQueryText(); - if (queryText == null) + if (queryText == null || selectedFile == null) return; // nothing to initialize - - updateValuesFromQuery(queryText); + + updateValuesFromQuery(queryText); if (dataSetDesign.getPublicProperties() != null) { currentSheetName = dataSetDesign.getPublicProperties().getProperty( @@ -1325,7 +1325,7 @@ public class ExcelFileSelectionWizardPage extends DataSetWizardPage implements validateHasSelectedColumns(); return; } - if ( isNewFile( queryText, getFileName( selectedFile ) ) ) + if (selectedFile != null && isNewFile( queryText, getFileName( selectedFile ) ) ) { updateColumnsFromQuery(queryText, selectedFile); } @@ -1580,7 +1580,12 @@ public class ExcelFileSelectionWizardPage extends DataSetWizardPage implements return; dataSetDesign.setQueryText(queryText); savePublicProperties(dataSetDesign); - + + if ( selectedFile == null ) + { + dataSetDesign.setResultSets(null); + return; + } if( ! validateHasSelectedColumns() ) { // don't prepare query; simply reset result set definition |

