db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r751639 - in /db/derby/code/branches/10.4/java: client/org/apache/derby/client/am/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/loc/
Date Mon, 09 Mar 2009 09:52:12 GMT
Author: kristwaa
Date: Mon Mar  9 09:52:11 2009
New Revision: 751639

URL: http://svn.apache.org/viewvc?rev=751639&view=rev
Log:
DERBY-4060: Blob.getBinaryStream(long,long) is off by one for the pos+len check.
Backported doc fix from trunk (revision 751637).

Modified:
    db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Blob.java
    db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Clob.java
    db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
    db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
    db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml

Modified: db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Blob.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Blob.java?rev=751639&r1=751638&r2=751639&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Blob.java (original)
+++ db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Blob.java Mon Mar 
9 09:52:11 2009
@@ -644,8 +644,8 @@
      * @return <code>InputStream</code> through which the partial
      * <code>Blob</code> value can be read.
      * @throws SQLException if pos is less than 1 or if pos is greater than
-     * the number of bytes in the <code>Blob</code> or if pos + length is
-     * greater than the number of bytes in the <code>Blob</code>
+     * the number of bytes in the {@code Blob} or if {@code pos + length} is
+     * greater than {@code Blob.length() +1}
      */
     public InputStream getBinaryStream(long pos, long length)
         throws SQLException {

Modified: db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Clob.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Clob.java?rev=751639&r1=751638&r2=751639&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Clob.java (original)
+++ db/derby/code/branches/10.4/java/client/org/apache/derby/client/am/Clob.java Mon Mar 
9 09:52:11 2009
@@ -875,9 +875,8 @@
      * value can be read.
      * @throws SQLException if pos is less than 1 or if pos is greater than the
      * number of
-     * characters in the <code>Clob</code> or if pos + length is greater than
-     * the number of
-     * characters in the <code>Clob</code>
+     * characters in the {@code Clob} or if {@code pos + length} is greater than
+     * {@code Clob.length() +1}
      */
     public Reader getCharacterStream(long pos, long length)
         throws SQLException {

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java?rev=751639&r1=751638&r2=751639&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java (original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java Mon
Mar  9 09:52:11 2009
@@ -993,8 +993,8 @@
      * @param length the length in bytes of the partial value to be retrieved
      * @return through which the partial <code>Blob</code> value can be read.

      * @throws SQLException if pos is less than 1 or if pos is greater than 
-     *      the number of bytes in the <code>Blob</code> or if pos + length is
-     *      greater than the number of bytes in the <code>Blob</code>
+     *      the number of bytes in the {@code Blob} or if {@code pos + length}
+     *      is greater than {@code Blob.length() +1}
      */
     public InputStream getBinaryStream(long pos, long length)
         throws SQLException {

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java?rev=751639&r1=751638&r2=751639&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java (original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/jdbc/EmbedClob.java Mon
Mar  9 09:52:11 2009
@@ -689,11 +689,8 @@
      * value can be read.
      * @throws SQLException if pos is less than 1 or if pos is greater than the
      * number of
-     * characters in the <code>Clob</code> or if pos + length is greater than
-     * the number of
-     * characters in the <code>Clob</code>
-     *
-     * @throws SQLException.
+     * characters in the {@code Clob} or if {@code pos + length} is greater than
+     * {@code Clob.length() +1}
      */
     public java.io.Reader getCharacterStream(long pos, long length)
         throws SQLException {

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml?rev=751639&r1=751638&r2=751639&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml Mon Mar  9 09:52:11
2009
@@ -4383,7 +4383,7 @@
 
             <msg>
                 <name>XJ087.S</name>
-                <text>Sum of position('{0}') and length('{1}') is greater than the
size of the LOB.</text>
+                <text>Sum of position('{0}') and length('{1}') is greater than the
size of the LOB plus one.</text>
                 <arg>pos</arg>
                 <arg>length</arg>
             </msg>



Mime
View raw message