db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r547715 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/jdbc/ testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/
Date Fri, 15 Jun 2007 15:40:38 GMT
Author: kristwaa
Date: Fri Jun 15 08:40:37 2007
New Revision: 547715

URL: http://svn.apache.org/viewvc?view=rev&rev=547715
Log:
DERBY-2830: Rename UpdateableBlobStream to UpdatableBlobStream. Also renames the corresponding
test class and all affected classes.
Patch file: derby-2830-1b.diff

Added:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdatableBlobStream.java
      - copied, changed from r547713, db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdateableBlobStream.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdatableStreamTest.java
      - copied, changed from r547713, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdateableStreamTest.java
Removed:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdateableBlobStream.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdateableStreamTest.java
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.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?view=diff&rev=547715&r1=547714&r2=547715
==============================================================================
--- 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 Fri Jun 15 08:40:37
2007
@@ -458,7 +458,7 @@
                         setupContextStack();
 
                     ((Resetable)myStream).resetStream();
-                    return new UpdateableBlobStream (this, 
+                    return new UpdatableBlobStream (this, 
                             new AutoPositioningStream (this, myStream, this));
                 }
             }
@@ -961,7 +961,7 @@
         }
         
         try {
-            return new UpdateableBlobStream(this,
+            return new UpdatableBlobStream(this,
                                             getBinaryStream(),
                                             pos-1,
                                             length);

Copied: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdatableBlobStream.java
(from r547713, db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdateableBlobStream.java)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdatableBlobStream.java?view=diff&rev=547715&p1=db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdateableBlobStream.java&r1=547713&p2=db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdatableBlobStream.java&r2=547715
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdateableBlobStream.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UpdatableBlobStream.java Fri
Jun 15 08:40:37 2007
@@ -1,6 +1,6 @@
 /*
 
-   Derby - Class org.apache.derby.impl.jdbc.UpdateableBlobStream
+   Derby - Class org.apache.derby.impl.jdbc.UpdatableBlobStream
 
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
@@ -30,13 +30,13 @@
 import org.apache.derby.iapi.services.i18n.MessageService;
 
 /**
- * Updateable blob stream is a wrapper stream over dvd stream
+ * Updatable blob stream is a wrapper stream over dvd stream
  * and LOBInputStream.
  * It detects if blob data has moved from dvd to clob control. If this happens,
  * it will update itself to point to LOBInputStream and reflect changes made to
  * the Blob after the current position of the stream.
  */
-class UpdateableBlobStream extends InputStream {
+class UpdatableBlobStream extends InputStream {
     /**
      * Flag to check if it is using stream from LOBStreamControl or from DVD.
      * <code>true</code> means data is read from LOBStreamControl,
@@ -55,12 +55,13 @@
     
 
     /**
-     * Constructs UpdateableBlobStream using the the InputStream receives as the
+     * Constructs UpdatableBlobStream using the the InputStream receives as the
      * parameter. The initial position is set to the <code>0</code>.
+     * 
      * @param blob EmbedBlob this stream is associated with.
      * @param is InputStream this class is going to use internally.
      */
-    UpdateableBlobStream (EmbedBlob blob, InputStream is) {
+    UpdatableBlobStream (EmbedBlob blob, InputStream is) {
         stream = is;
         this.pos = 0;
         this.blob = blob;
@@ -71,11 +72,11 @@
     }
     
     /**
-     * Construct an <code>UpdateableBlobStream<code> using the 
+     * Construct an <code>UpdatableBlobStream<code> using the 
      * <code>InputStream</code> received as parameter. The initial
      * position in the stream is set to <code>pos</code> and the
      * stream is restricted to a length of <code>len</code>.
-     *
+     * 
      * @param blob EmbedBlob this stream is associated with.
      * @param is InputStream this class is going to use internally.
      * @param pos initial position
@@ -84,7 +85,7 @@
      * @throws IOException
      * @throws SQLException
      */
-    UpdateableBlobStream (EmbedBlob blob, InputStream is, long pos, long len) 
+    UpdatableBlobStream (EmbedBlob blob, InputStream is, long pos, long len) 
     throws IOException, SQLException {
         this(blob, is);
         //The length requested cannot exceed the length

Copied: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdatableStreamTest.java
(from r547713, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdateableStreamTest.java)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdatableStreamTest.java?view=diff&rev=547715&p1=db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdateableStreamTest.java&r1=547713&p2=db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdatableStreamTest.java&r2=547715
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdateableStreamTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobUpdatableStreamTest.java
Fri Jun 15 08:40:37 2007
@@ -1,7 +1,7 @@
 /*
  *
  * Derby - Class 
- *   org.apache.derbyTesting.functionTests.tests.jdbcapi.BlobUpdateableStreamTest
+ *   org.apache.derbyTesting.functionTests.tests.jdbcapi.BlobUpdatableStreamTest
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -31,19 +31,19 @@
 import org.apache.derbyTesting.junit.TestConfiguration;
 
 /**
- * Test if blob stream updates itself to point to LOBInputStream 
+ * Test if blob stream updates itself to point to LOBInputStream
  * if the blob is updated after fetching the stream.
  */
-public class BlobUpdateableStreamTest extends BaseJDBCTestCase {
-    public BlobUpdateableStreamTest (String name) {
+public class BlobUpdatableStreamTest extends BaseJDBCTestCase {
+    public BlobUpdatableStreamTest (String name) {
         super (name);
     }
-    
-    public void testUpdateableBlob () throws Exception {
+
+    public void testUpdatableBlob () throws Exception {
         getConnection().setAutoCommit (false);
         PreparedStatement ps = prepareStatement ("insert into testblob " +
                 "values (?)");
-        //insert a large blob to ensure dvd gives out a stream and not 
+        //insert a large blob to ensure dvd gives out a stream and not
         //a byte array
         ps.setBinaryStream (1, new LoopingAlphabetStream (1024 * 1024), 1024 * 1024);
         ps.executeUpdate();
@@ -58,7 +58,7 @@
         blob.truncate (l);
         int ret = is.read();
         //should not be able to read after truncated value
-        assertEquals ("stream update falield", -1, ret);
+        assertEquals ("stream update failed", -1, ret);
         byte [] buffer = new byte [1024];
         for (int i = 0; i < buffer.length; i++)
             buffer [i] = (byte) (i % 255);
@@ -80,17 +80,17 @@
         stmt.close();
         commit();
     }
-    
+
     public static Test suite () {
         return TestConfiguration.defaultSuite (
-                BlobUpdateableStreamTest.class);
+                BlobUpdatableStreamTest.class);
     }
-    
+
     public void setUp() throws  Exception {
         Statement stmt = createStatement();
         stmt.execute ("create table testblob (data blob)");
         stmt.close();
-    }    
+    }
 
     protected void tearDown() throws Exception {
         Statement stmt = createStatement();
@@ -98,5 +98,5 @@
         stmt.close();
         commit ();
         super.tearDown();
-    }       
+    }
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java?view=diff&rev=547715&r1=547714&r2=547715
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
Fri Jun 15 08:40:37 2007
@@ -77,7 +77,7 @@
 		suite.addTest(DriverTest.suite());
 		suite.addTest(ParameterMetaDataJdbc30Test.suite());
         suite.addTest(ClobTest.suite());
-        suite.addTest(BlobUpdateableStreamTest.suite());
+        suite.addTest(BlobUpdatableStreamTest.suite());
         suite.addTest(AIjdbcTest.suite());
 
         // Old harness .java tests that run using the HarnessJavaTest



Mime
View raw message