Bug 179661 NPE throws out when preview the attached report [1102]
Description: NPE throws out when preview the attached report [1102] Build number: 2.2.0.v20070328-0630 Steps to reproduce: 1, Using attached report design file 2, Preview Expected result: Previewed successfully Actual result: NPE throws out when preview Error log:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/util/OlapExpressionUtil.java
if ( expr == null )
			return null;
		if ( !expr.matches( "\\Qdimension[\"\\E.*\\Q\"][\"\\E.*\\Q\"]\\E" ) )
			return null;
		expr = expr.replaceFirst( "\\Qdimension\\E", "" );
		String[] result = expr.split( "\\Q\"][\"\\E" );
		result[0] = result[0].replaceAll( "\\Q[\"\\E", "" );
		result[1] = result[1].replaceAll( "\\Q\"]\\E", "" );
		return result;
	}
	/**
	 * This method is to get the measure name that referenced by a measure
	 * reference expression.
	 * 
	 * @param expr
	 * @return
	 */
	public static String getMeasure( String expr )
	{
		if ( expr == null )
			return null;
		if ( !expr.matches( "\\Qmeasure[\"\\E.*\\Q\"]\\E" ) )
			return null;
		return expr.replaceFirst( "\\Qmeasure[\"\\E", "" )
				.replaceFirst( "\\Q\"]\\E", "" );
	}
	/**
	 * This method returns a list of ICubeAggrDefn instances which describes the
	 * aggregations that need to be calcualted in cube query.
	 *