summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-10-26 01:03:37 (EDT)
committer mwu2011-10-26 01:03:37 (EDT)
commitf05c077130b1dd44cb88983416295125546bb832 (patch)
tree771c1204da75da90df70f896c299ea47f344484d
parent20e52c85df1e3dd79f41520f7de0baae5d7f97bc (diff)
downloadorg.eclipse.birt-f05c077130b1dd44cb88983416295125546bb832.zip
org.eclipse.birt-f05c077130b1dd44cb88983416295125546bb832.tar.gz
org.eclipse.birt-f05c077130b1dd44cb88983416295125546bb832.tar.bz2
fix ted bug 41976, validate the measure expression when create cube,
enhance the error message.
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java
index a22bb89..d47c3ff 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.java
@@ -995,6 +995,11 @@ public class DataRequestSessionImpl extends DataRequestSession
b.setExpression( new ScriptExpression( "1" ) );
}
}
+
+ if( b.getExpression( ) == null || ((ScriptExpression)b.getExpression( )).getText( ) == null )
+ {
+ throw new AdapterException( ResourceConstants.INVALID_MEASURE_EXPRESSION, measureName );
+ }
b.setAggrFunction( null );
if ( b.getAggregatOns( ) != null )