db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1052271 - /db/derby/code/trunk/java/client/org/apache/derby/client/net/NetResultSet40.java
Date Thu, 23 Dec 2010 13:57:51 GMT
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();
     }



Mime
View raw message