summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-10-27 03:49:11 (EDT)
committer mwu2011-10-27 03:49:11 (EDT)
commit070ce286347f5fa2de880036a16a9998b149b58d (patch)
tree46caffc2b8add54577fdbd4d656b718add46aa11
parent3e12b99a255fbe0c940b58eb701491194223c3dd (diff)
downloadorg.eclipse.birt-070ce286347f5fa2de880036a16a9998b149b58d.zip
org.eclipse.birt-070ce286347f5fa2de880036a16a9998b149b58d.tar.gz
org.eclipse.birt-070ce286347f5fa2de880036a16a9998b149b58d.tar.bz2
fix ted 43739, check the IResultIterator will not be null
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryResults.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryResults.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryResults.java
index 684fd48..1074083 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryResults.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryResults.java
@@ -129,8 +129,12 @@ public class QueryResults implements IQueryResults, IQueryService
IResultMetaData metaData = queryService.getResultMetaData( );
if ( metaData == null )
{
- //Failed to get metadata during query preparation, then execute query first and fetch metadata later
- return getResultIterator( ).getResultMetaData( );
+ IResultIterator rsIterator = getResultIterator( );
+ if ( rsIterator != null )
+ {
+ return rsIterator.getResultMetaData( );
+ }
+ return null;
}
else
{