Bug 183591 ResultSets opened during querying metadata are not closed - it can cause exception on Oracle
Build ID: 2.2.0.v20070329 Steps To Reproduce: 1.Create report with multiple stored procedures and oracle connection. 2.Generate report and check number of opened cursors on Oracle side. 3.If number of opened cursor exceeds Oracle limit, exception is thrown. More information: ResultSets opened in org.eclipse.birt.report.data.oda.jdbc.CallStatement - methods createSchemaList and getCallableParamMetaData are not closed.
data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/CallStatement.java
*/
	private String getProcedureName( String text )
	{
		assert text != null;
		String name;
		int start = text.toLowerCase( ).indexOf( "call " ) + 4;
		int end = text.indexOf( "(", start );
		if ( end < start )
			end = text.length( );
		name = text.substring( start, end ).trim( );
		name = escapeIdentifier( name );
		if ( name.indexOf( ";" ) > 0 )
			name = name.substring( 0, name.indexOf( ";" ) );
		return name;
	}
	/**
	 * escape the double quote & bracket
	 * @param text
	 * @return
	 */
	private String escapeIdentifier( String text )
	{
		if ( ( text.startsWith( "\"" ) && text.endsWith( "\"" ) )
				|| ( text.startsWith( "[" ) && text.endsWith( "]" ) ) )
			return text.substring( 1, text.length( ) - 1 );
		else
			return text;
	}
	/**
	 * Converts a RuntimeException which occurred in the setting parameter value