db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r484672 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
Date Fri, 08 Dec 2006 17:51:55 GMT
Author: djd
Date: Fri Dec  8 09:51:55 2006
New Revision: 484672

URL: http://svn.apache.org/viewvc?view=rev&rev=484672
Log:
DERBY-2083 Fix broken backup/restore tests. Caused by not updating path through code
when a service is directly accessed as a file rather than through the StorageFactory api.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java?view=diff&rev=484672&r1=484671&r2=484672
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
Fri Dec  8 09:51:55 2006
@@ -263,7 +263,12 @@
                         if( recreateFrom != null) // restore from a file
                         {
                             File propFile = new File(recreateFrom, PersistentService.PROPERTIES_NAME);
-                            return new FileInputStream(propFile);
+                            InputStream is = new FileInputStream(propFile);
+                            try {
+                                serviceProperties.load(new BufferedInputStream(is));
+                            } finally {
+                                is.close();
+                            }
                         }
                         else
                         {
@@ -281,8 +286,8 @@
                             } finally {
                                storageFactory.shutdown();
                             }
-                            return null;
                         }
+                        return null;
                     }
                 }
                 );



Mime
View raw message