Skip to content
Snippets Groups Projects
Commit e90d9cb1 authored by felmer's avatar felmer
Browse files

LMS-529 get rid of IOException in method markAsDumpRestorable()

SVN: 7943
parent 1d29acaa
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,6 @@
package ch.systemsx.cisd.dbmigration;
import java.io.File;
import java.io.IOException;
import ch.systemsx.cisd.common.Script;
......@@ -36,7 +35,7 @@ public interface ISqlScriptProvider
public boolean isDumpRestore(String version);
/** marks that this script provider is suitable for a dump restore */
public void markAsDumpRestorable(String version) throws IOException;
public void markAsDumpRestorable(String version);
/**
* Returns the folder where all dump files for <var>version</var> reside.
......
......@@ -23,6 +23,7 @@ import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;
import ch.systemsx.cisd.common.Script;
import ch.systemsx.cisd.common.exceptions.CheckedExceptionTunnel;
import ch.systemsx.cisd.common.filesystem.FileUtilities;
import ch.systemsx.cisd.common.logging.LogCategory;
import ch.systemsx.cisd.common.logging.LogFactory;
......@@ -70,9 +71,15 @@ public class SqlScriptProvider implements ISqlScriptProvider
return getDumprestoreFile(version).exists();
}
public void markAsDumpRestorable(String version) throws IOException
public void markAsDumpRestorable(String version)
{
FileUtils.touch(getDumprestoreFile(version));
try
{
FileUtils.touch(getDumprestoreFile(version));
} catch (IOException ex)
{
throw CheckedExceptionTunnel.wrapIfNecessary(ex);
}
}
private File getDumprestoreFile(String version)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment