You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2010/12/23 14:57:51 UTC

svn commit: r1052271 - /db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java

Author: rhillegas
Date: Thu Dec 23 13:57:50 2010
New Revision: 1052271

URL: http://svn.apache.org/viewvc?rev=1052271&view=rev
Log:
DERBY-4869: Don't intercept all SQLExceptions in NetResultSet40.getObject(int,Class).

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java?rev=1052271&r1=1052270&r2=1052271&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java Thu Dec 23 13:57:50 2010
@@ -275,11 +275,9 @@ public class NetResultSet40 extends NetR
 
         if ( type == null )
         {
-            throw mismatchException( "NULL", columnIndex, null );
+            throw mismatchException( "NULL", columnIndex );
         }
 
-        Exception ex = null;
-        
         try {
             if ( String.class.equals( type ) ) { return (T) getString( columnIndex ); }
             else if ( BigDecimal.class.equals( type ) ) { return (T) getBigDecimal( columnIndex ); }
@@ -301,16 +299,16 @@ public class NetResultSet40 extends NetR
                 return type.cast( getObject( columnIndex ) );
             }
         }
-        catch (Exception e) { ex = e; }
+        catch (ClassCastException e) {}
         
-        throw mismatchException( type.getName(), columnIndex, ex );
+        throw mismatchException( type.getName(), columnIndex );
     }
-    private SQLException    mismatchException( String targetTypeName, int columnIndex, Throwable t )
+    private SQLException    mismatchException( String targetTypeName, int columnIndex )
         throws SQLException
     {
         String sourceTypeName = getMetaData().getColumnTypeName( columnIndex );
         ClientMessageId cmi = new ClientMessageId( SQLState.LANG_DATA_TYPE_GET_MISMATCH );
-        SqlException se = new SqlException( agent_.logWriter_, cmi, targetTypeName, sourceTypeName, t );
+        SqlException se = new SqlException( agent_.logWriter_, cmi, targetTypeName, sourceTypeName );
 
         return se.getSQLException();
     }