Bug 132504 Several 'space' before or after Database URL can pass the 'Test Connection',but may be cause error when set a dataset
Description: When set a datasource e.g.(net.sourceforge.jtds.jdbc.Driver)and input the Database URL,'space' before or after URL e.g(jdbc:jtds:sybase://spmdb:5000/BIRT) will be ignored.So it's no mater to be exist.But it may be cause error when set a dataset. Step to reproduce: 1.new data source Set Driver class:net.sourceforge.jtds.jdbc.Driver. 2.set the url jdbc:jtds:sybase://spmdb:5000/BIRT User: sa 3.click "Test Connection" it should be successful 4.then insert an or several 'space' before the url which inpurted just now 5.click "Test Connection" again, it is also ok. 6.and then new a dataset from the source,an error occur 7.remove the 'space' inserted,it is ok Actual result: An error message appear say:"No suitable driver" Expected result: The "Test Connection" fuction can check the 'space' problem or auto throw the useless 'space' correctly.If the "Test Connection" passed, the dataset setting shouldn't influenced by the 'space' problem.
data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/Statement.java
/**
	 * Format Query Text
	 * Simply replace all LF(10) with " "
	 * @param source
	 * @return
	 */
	private String formatQueryText(String source)
	{
		return source.replaceAll("\n"," ");
	}
	
	/**
	 * Converts a RuntimeException which occurred in the setting parameter value
	 * of a ROM script to an OdaException, and rethrows such exception. This
	 * method never returns.
	 */
	private static void rethrowRunTimeException( RuntimeException e, String msg )
			throws OdaException
	{
		OdaException odaException = new OdaException( msg );
		odaException.initCause( e );
		logger.logp( java.util.logging.Level.FINE,
				Statement.class.getName( ),
				"rethrowRunTimeException",
				msg,
				odaException );
		throw odaException;
	}
}