jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r791791 - in /jackrabbit/branches/1.x: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/ jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/
Date Tue, 07 Jul 2009 10:59:22 GMT
Author: jukka
Date: Tue Jul  7 10:59:22 2009
New Revision: 791791

URL: http://svn.apache.org/viewvc?rev=791791&view=rev
Log:
1.x: Merged revisions 783383 and 783386 (JCR-2128)

Added:
    jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DerbyDataStore.java
      - copied unchanged from r783383, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DerbyDataStore.java
Modified:
    jackrabbit/branches/1.x/   (props changed)
    jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java
    jackrabbit/branches/1.x/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java

Propchange: jackrabbit/branches/1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul  7 10:59:22 2009
@@ -1 +1 @@
-/jackrabbit/trunk:770143-773197,773483,773525-773554,773584,773588,773828,773835-775756,775833,775836,775840,775868,775981,775986,776036,776256,776310,776313,776321-776322,776332,776356-776357,776362,776373,776650-776693,776737,776757,776776-776777,777024,777029,777034,777478,777509,777541,777548,777936,778445,778613,778616,778621,778645,778720,778802,779032,779040,779068-779071,779074,779076,779081,779084,779086-779088,779090-779092,779094-779096,779101,779223,779225,779227-779228,779230,779233-779234,779460,779475-779476,779504,779550,779552,779555,779561,779563,779583,779590,779618,779621-779622,779624,779642,779654,779657-779659,779661,779936,780006,780010,780025,780085,780989,780993,781017,781051,781054,781294-781300,781305-781311,781318,781328,781338,781344,781347,781369,781372,781377,781416-781417,781423,782621-782622,782644,782646,782652,782669,782675,782677,782683,782694,782921,782925,782930,782936,783002,783004-783005,783042-783043,783239
+/jackrabbit/trunk:770143-773197,773483,773525-773554,773584,773588,773828,773835-775756,775833,775836,775840,775868,775981,775986,776036,776256,776310,776313,776321-776322,776332,776356-776357,776362,776373,776650-776693,776737,776757,776776-776777,777024,777029,777034,777478,777509,777541,777548,777936,778445,778613,778616,778621,778645,778720,778802,779032,779040,779068-779071,779074,779076,779081,779084,779086-779088,779090-779092,779094-779096,779101,779223,779225,779227-779228,779230,779233-779234,779460,779475-779476,779504,779550,779552,779555,779561,779563,779583,779590,779618,779621-779622,779624,779642,779654,779657-779659,779661,779936,780006,780010,780025,780085,780989,780993,781017,781051,781054,781294-781300,781305-781311,781318,781328,781338,781344,781347,781369,781372,781377,781416-781417,781423,782621-782622,782644,782646,782652,782669,782675,782677,782683,782694,782921,782925,782930,782936,783002,783004-783005,783042-783043,783239,783278,783304,783319-78332
 1,783324,783326,783330-783333,783337-783338,783340-783341,783343,783345-783346,783356,783359,783383,783386,783435,783444,783447,783523,783688,783703,783708,783710,783757,783759,783786,783809

Modified: jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java?rev=791791&r1=791790&r2=791791&view=diff
==============================================================================
--- jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java
(original)
+++ jackrabbit/branches/1.x/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java
Tue Jul  7 10:59:22 2009
@@ -829,7 +829,7 @@
     /**
      * {@inheritDoc}
      */
-    public synchronized void close() {
+    public synchronized void close() throws DataStoreException {
         ArrayList list = connectionPool.getAll();
         for (int i = 0; i < list.size(); i++) {
             ConnectionRecoveryManager conn = (ConnectionRecoveryManager) list.get(i);

Modified: jackrabbit/branches/1.x/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.x/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java?rev=791791&r1=791790&r2=791791&view=diff
==============================================================================
--- jackrabbit/branches/1.x/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java
(original)
+++ jackrabbit/branches/1.x/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/DBDataStoreTest.java
Tue Jul  7 10:59:22 2009
@@ -19,8 +19,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.InputStream;
-import java.sql.DriverManager;
-import java.sql.SQLException;
 import java.util.Random;
 
 import junit.framework.TestCase;
@@ -53,13 +51,10 @@
     }
 
     protected void tearDown() {
-        store.close();
 
         try {
-            // TODO: This should automatically be done by DbDataStore.close()
-            DriverManager.getConnection(
-                    "jdbc:derby:target/test-db-datastore/db;shutdown=true");
-        } catch (SQLException expected) {
+            store.close();
+        } catch (DataStoreException expected) {
         }
     }
 
@@ -75,7 +70,7 @@
             try {
                 assertNotNull(stream);
                 for (int j = 0; j < data.length; j++) {
-                    assertEquals(((int) data[j]) & 0xff, stream.read());
+                    assertEquals((data[j]) & 0xff, stream.read());
                 }
                 assertEquals(-1, stream.read());
             } finally {
@@ -95,7 +90,7 @@
         // verify the contents of all the streams, reading them in parallel
         for (int i = 0; i < data.length; i++) {
             for (int j = 0; j < streams.length; j++) {
-                assertEquals(((int) data[i]) & 0xff, streams[j].read());
+                assertEquals((data[i]) & 0xff, streams[j].read());
             }
         }
 



Mime
View raw message