Author: shawkins
Date: 2012-05-20 09:12:16 -0400 (Sun, 20 May 2012)
New Revision: 4125
Modified:
branches/7.7.x/client/src/main/java/org/teiid/client/SourceWarning.java
branches/7.7.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
Log:
TEIID-2054 fixing double reporting of initial warnings and also removing SourceWarning
stacktrace
Modified: branches/7.7.x/client/src/main/java/org/teiid/client/SourceWarning.java
===================================================================
--- branches/7.7.x/client/src/main/java/org/teiid/client/SourceWarning.java 2012-05-20
13:11:32 UTC (rev 4124)
+++ branches/7.7.x/client/src/main/java/org/teiid/client/SourceWarning.java 2012-05-20
13:12:16 UTC (rev 4125)
@@ -34,6 +34,7 @@
public class SourceWarning extends TeiidException {
+ private static final StackTraceElement[] EMPTY_STACK_TRACE = new StackTraceElement[0];
private String modelName = "UNKNOWN"; // variable stores the name of the model
for the atomic query //$NON-NLS-1$
private String connectorBindingName = "UNKNOWN"; // variable stores name of
the connector binding //$NON-NLS-1$
private boolean partialResults;
@@ -53,6 +54,7 @@
this.connectorBindingName = connectorBinding;
}
this.partialResults = partialResults;
+ this.setStackTrace(EMPTY_STACK_TRACE);
}
/**
Modified: branches/7.7.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java
===================================================================
--- branches/7.7.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2012-05-20
13:11:32 UTC (rev 4124)
+++ branches/7.7.x/client/src/main/java/org/teiid/jdbc/ResultSetImpl.java 2012-05-20
13:12:16 UTC (rev 4125)
@@ -27,20 +27,7 @@
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
-import java.sql.Array;
-import java.sql.Blob;
-import java.sql.Clob;
-import java.sql.Date;
-import java.sql.NClob;
-import java.sql.Ref;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.RowId;
-import java.sql.SQLException;
-import java.sql.SQLWarning;
-import java.sql.SQLXML;
-import java.sql.Time;
-import java.sql.Timestamp;
+import java.sql.*;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
@@ -131,7 +118,6 @@
this.requestID = statement.getCurrentRequestID();
this.cursorType = statement.getResultSetType();
this.batchResults = new BatchResults(this, getCurrentBatch(resultsMsg),
this.cursorType == ResultSet.TYPE_FORWARD_ONLY ? 1 : BatchResults.DEFAULT_SAVED_BATCHES);
- accumulateWarnings(resultsMsg);
this.serverTimeZone = statement.getServerTimeZone();
if (metadata == null) {
MetadataProvider provider = new DeferredMetadataProvider(resultsMsg.getColumnNames(),
Show replies by date