db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1502937 - in /db/derby/code/branches/10.8: ./ java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java java/engine/org/apache/derby/impl/jdbc/EmbedClob.java java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java
Date Sun, 14 Jul 2013 04:53:38 GMT
Author: mamta
Date: Sun Jul 14 04:53:38 2013
New Revision: 1502937

URL: http://svn.apache.org/r1502937
Log:
DERBY-5760(Missing argument in some XJ022 errors)

Backporting the code contributed by Knut to 10.8


Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
    db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
    db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1341350

Modified: db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java?rev=1502937&r1=1502936&r2=1502937&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java (original)
+++ db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java Sun
Jul 14 04:53:38 2013
@@ -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/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java?rev=1502937&r1=1502936&r2=1502937&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java (original)
+++ db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java Sun
Jul 14 04:53:38 2013
@@ -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/branches/10.8/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java?rev=1502937&r1=1502936&r2=1502937&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java
(original)
+++ db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java
Sun Jul 14 04:53:38 2013
@@ -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