db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1341350 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc: EmbedBlob.java EmbedClob.java TemporaryClob.java
Date Tue, 22 May 2012 08:36:16 GMT
Author: kahatlen
Date: Tue May 22 08:36:16 2012
New Revision: 1341350

URL: http://svn.apache.org/viewvc?rev=1341350&view=rev
Log:
DERBY-5760: Missing argument in some XJ022 errors

Use helper method that sets the argument automatically.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java?rev=1341350&r1=1341349&r2=1341350&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java Tue May 22 08:36:16
2012
@@ -154,7 +154,7 @@ final class EmbedBlob extends Connection
       This constructor should only be called by EmbedResultSet.getBlob
     */
     protected EmbedBlob(DataValueDescriptor dvd, EmbedConnection con)
-        throws StandardException
+        throws StandardException, SQLException
     {
         super(con);
         // if the underlying column is null, ResultSet.getBlob will return null,
@@ -189,8 +189,7 @@ final class EmbedBlob extends Connection
                 control = new LOBStreamControl (
                             getEmbedConnection(), dvdBytes);
             } catch (IOException e) {
-                throw StandardException.newException (
-                                        SQLState.SET_STREAM_FAILURE, e);
+                throw Util.setStreamFailure(e);
             }
         }
         //add entry in connection so it can be cleared 
@@ -210,7 +209,7 @@ final class EmbedBlob extends Connection
      *      data to temporary storage fails
      */
     private int handleStreamValue(InputStream dvdStream, EmbedConnection con)
-            throws StandardException {
+            throws StandardException, SQLException {
         int offset = 0;
         // b) Resetable stream
         //    In this case the stream is coming from the Derby store.
@@ -283,8 +282,7 @@ final class EmbedBlob extends Connection
                 }
                 tmpStream.close();
             } catch (IOException ioe) {
-                throw StandardException.newException (
-                                        SQLState.SET_STREAM_FAILURE, ioe);
+                throw Util.setStreamFailure(ioe);
             }
         }
         return offset;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java?rev=1341350&r1=1341349&r2=1341350&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java Tue May 22 08:36:16
2012
@@ -102,7 +102,7 @@ final class EmbedClob extends Connection
      * @throws StandardException
      */
     protected EmbedClob(EmbedConnection con, StringDataValue dvd)
-        throws StandardException
+        throws StandardException, SQLException
     {
         super(con);
         // if the underlying column is null, ResultSet.getClob will return null,
@@ -144,12 +144,8 @@ final class EmbedClob extends Connection
                 clob = new TemporaryClob(dvd.getString(),
                         this);
             }
-            catch (SQLException sqle) {
-                throw StandardException.newException (sqle.getSQLState(), sqle);
-            }
             catch (IOException e) {
-                throw StandardException.newException (
-                                        SQLState.SET_STREAM_FAILURE, e);
+                throw Util.setStreamFailure(e);
             }
         }
         con.addLOBReference (this);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java?rev=1341350&r1=1341349&r2=1341350&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java Tue May
22 08:36:16 2012
@@ -179,7 +179,7 @@ final class TemporaryClob implements Int
      * @param conChild connection object used to obtain synchronization object
      */
     TemporaryClob (String data, ConnectionChild conChild)
-                          throws IOException, SQLException, StandardException {
+                          throws IOException, StandardException {
         if (conChild == null) {
             throw new NullPointerException("conChild cannot be <null>");
         }



Mime
View raw message