Commit d4682d94 authored by gmantele's avatar gmantele
Browse files

[TAP] Small fix: the translated SQL query was logged only after the query...

[TAP] Small fix: the translated SQL query was logged only after the query execution ; so, in case of error,
the SQL query is not logged and can not be checked by service provider.
parent aafc7209
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ import adql.translator.TranslationException;
 * </i></p>
 * 
 * @author Gr&eacute;gory Mantelet (CDS;ARI)
 * @version 2.0 (04/2015)
 * @version 2.0 (06/2015)
 * @since 2.0
 */
public class JDBCConnection implements DBConnection {
@@ -432,9 +432,9 @@ public class JDBCConnection implements DBConnection {
			}

			// 3. Execute the SQL query:
			result = stmt.executeQuery(sql);
			if (logger != null)
				logger.logDB(LogLevel.INFO, this, "EXECUTE", "SQL query: " + sql.replaceAll("(\t|\r?\n)+", " "), null);
			result = stmt.executeQuery(sql);

			// 4. Return the result through a TableIterator object:
			if (logger != null)