Added opened database test in method for FileTree implementation.

This commit is contained in:
Christian P. MOMON 2018-02-28 10:29:13 +01:00
parent 4f1a466007
commit eaacc3a3d6
2 changed files with 533 additions and 389 deletions

View file

@ -1,5 +1,5 @@
/** /**
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr> * Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
* *
* This file is part of SikevaDB, simple key value database. * This file is part of SikevaDB, simple key value database.
* *
@ -32,6 +32,7 @@ import fr.devinsy.sikevadb.core.Element;
import fr.devinsy.sikevadb.core.Elements; import fr.devinsy.sikevadb.core.Elements;
import fr.devinsy.sikevadb.core.SikevaDB; import fr.devinsy.sikevadb.core.SikevaDB;
import fr.devinsy.sikevadb.core.SikevaDBException; import fr.devinsy.sikevadb.core.SikevaDBException;
import fr.devinsy.sikevadb.core.UnopenedDatabaseException;
import fr.devinsy.util.strings.StringList; import fr.devinsy.util.strings.StringList;
/** /**
@ -83,11 +84,17 @@ public class FileTreeSikevaDB implements SikevaDB
this.journalizer = null; this.journalizer = null;
} }
/** /* (non-Javadoc)
* @throws IOException * @see fr.devinsy.sikevadb.core.SikevaDB#clear()
*/ */
@Override @Override
public void clear() throws SikevaDBException public void clear() throws SikevaDBException
{
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{ {
try try
{ {
@ -102,27 +109,40 @@ public class FileTreeSikevaDB implements SikevaDB
throw new SikevaDBException("Error clearing database", exception); throw new SikevaDBException("Error clearing database", exception);
} }
} }
}
/** /* (non-Javadoc)
* * @see fr.devinsy.sikevadb.core.SikevaDB#close()
*/ */
@Override @Override
public void close() public void close() throws UnopenedDatabaseException
{
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{ {
this.journalizer = null; this.journalizer = null;
this.status = Status.CLOSED; this.status = Status.CLOSED;
} }
}
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#countOfElements()
*
*/ */
@Override @Override
public long countOfElements() public long countOfElements() throws UnopenedDatabaseException
{ {
long result; long result;
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
File[] topFiles = this.dataDirectory.listFiles(); File[] topFiles = this.dataDirectory.listFiles();
result = 0; result = 0;
@ -138,20 +158,26 @@ public class FileTreeSikevaDB implements SikevaDB
result += 1; result += 1;
} }
} }
}
// //
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#countOfElements(java.lang.String)
*
*/ */
@Override @Override
public long countOfElements(final String key) public long countOfElements(final String key) throws UnopenedDatabaseException
{ {
long result; long result;
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
if (key == null) if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
@ -170,19 +196,26 @@ public class FileTreeSikevaDB implements SikevaDB
result = subFiles.length; result = subFiles.length;
} }
} }
}
// //
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#countOfElements(java.lang.String, java.lang.String)
*/ */
@Override @Override
public long countOfElements(final String key, final String subkey) public long countOfElements(final String key, final String subkey) throws UnopenedDatabaseException
{ {
long result; long result;
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
if ((key == null) || (subkey == null)) if ((key == null) || (subkey == null))
{ {
throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "]."); throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "].");
@ -200,16 +233,22 @@ public class FileTreeSikevaDB implements SikevaDB
result = 0; result = 0;
} }
} }
}
// //
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#create()
*/ */
@Override @Override
public void create() throws SikevaDBException public void create() throws SikevaDBException
{
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{ {
if (this.status == Status.OPENED) if (this.status == Status.OPENED)
{ {
@ -230,35 +269,50 @@ public class FileTreeSikevaDB implements SikevaDB
this.configDirectory.mkdir(); this.configDirectory.mkdir();
} }
} }
}
/** /**
* Gets the config directory.
* *
* @return * @return the config directory
*/ */
public File getConfigDirectory() public File getConfigDirectory()
{ {
return this.configDirectory; File result;
result = this.configDirectory;
return result;
} }
/** /**
* Gets the data directory.
* *
* @return * @return the data directory
*/ */
public File getDataDirectory() public File getDataDirectory()
{ {
return this.dataDirectory; File result;
result = this.dataDirectory;
//
return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getElement(java.lang.String)
*
*/ */
@Override @Override
public Element getElement(final String key) throws SikevaDBException public Element getElement(final String key) throws SikevaDBException
{ {
Element result; Element result;
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -277,17 +331,19 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getElement(java.lang.String, java.lang.String)
*
*/ */
@Override @Override
public Element getElement(final String key, final String subkey) throws SikevaDBException public Element getElement(final String key, final String subkey) throws SikevaDBException
{ {
Element result; Element result;
// if (this.status == Status.CLOSED)
if ((key == null) || (subkey == null)) {
throw new UnopenedDatabaseException();
}
else if ((key == null) || (subkey == null))
{ {
throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "]."); throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "].");
} }
@ -309,14 +365,20 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getElements()
*/ */
@Override @Override
public Elements getElements() throws SikevaDBException public Elements getElements() throws SikevaDBException
{ {
Elements result; Elements result;
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
result = new Elements((int) countOfElements()); result = new Elements((int) countOfElements());
File[] topFiles = this.dataDirectory.listFiles(); File[] topFiles = this.dataDirectory.listFiles();
@ -343,20 +405,25 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
} }
}
// //
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getElements(java.lang.String)
*
*/ */
@Override @Override
public Elements getElements(final String key) throws SikevaDBException public Elements getElements(final String key) throws SikevaDBException
{ {
Elements result; Elements result;
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
if (key == null) if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
@ -377,31 +444,41 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
} }
}
// //
return result; return result;
} }
/** /**
* Gets the file tree directory.
* *
* @return * @return the file tree directory
*/ */
public File getFileTreeDirectory() public File getFileTreeDirectory()
{ {
return this.fileTreeDirectory; File result;
result = this.fileTreeDirectory;
//
return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getKeys()
*
* @throws SikevaDBException
*/ */
@Override @Override
public StringList getKeys() throws SikevaDBException public StringList getKeys() throws SikevaDBException
{ {
StringList result; StringList result;
// if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
result = new StringList((int) countOfElements()); result = new StringList((int) countOfElements());
File[] topFiles = this.dataDirectory.listFiles(); File[] topFiles = this.dataDirectory.listFiles();
@ -416,40 +493,55 @@ public class FileTreeSikevaDB implements SikevaDB
result.add(file.getName()); result.add(file.getName());
} }
} }
}
// //
return result; return result;
} }
/** /**
* Gets the login.
* *
* @return * @return the login
*/ */
public String getLogin() public String getLogin()
{ {
return this.login; String result;
result = this.login;
//
return result;
} }
/** /**
* Gets the password.
* *
* @return * @return the password
*/ */
public String getPassword() public String getPassword()
{ {
return this.password; String result;
result = this.password;
//
return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getSubkeys(java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public StringList getSubkeys(final String key) throws SikevaDBException public StringList getSubkeys(final String key) throws SikevaDBException
{ {
StringList result; StringList result;
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -473,17 +565,19 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getValue(java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public String getValue(final String key) throws SikevaDBException public String getValue(final String key) throws SikevaDBException
{ {
String result; String result;
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -506,17 +600,19 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getValue(java.lang.String, java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public String getValue(final String key, final String subkey) throws SikevaDBException public String getValue(final String key, final String subkey) throws SikevaDBException
{ {
String result; String result;
if ((key == null) || (subkey == null)) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if ((key == null) || (subkey == null))
{ {
throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "]."); throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "].");
} }
@ -540,17 +636,19 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#getValues(java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public StringList getValues(final String key) throws SikevaDBException public StringList getValues(final String key) throws SikevaDBException
{ {
StringList result; StringList result;
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -582,9 +680,8 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* * @see fr.devinsy.sikevadb.core.SikevaDB#isClosed()
* @return
*/ */
@Override @Override
public boolean isClosed() public boolean isClosed()
@ -597,8 +694,8 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#isCreated()
*/ */
@Override @Override
public boolean isCreated() throws SikevaDBException public boolean isCreated() throws SikevaDBException
@ -618,9 +715,8 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* * @see fr.devinsy.sikevadb.core.SikevaDB#isOpened()
* @return
*/ */
@Override @Override
public boolean isOpened() public boolean isOpened()
@ -640,16 +736,20 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#memorySize()
*
* @throws SikevaDBException
*/ */
@Override @Override
public long memorySize() throws SikevaDBException public long memorySize() throws SikevaDBException
{ {
long result; long result;
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
// //
result = 0; result = 0;
@ -678,22 +778,25 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
} }
}
// //
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#memorySize(java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public long memorySize(final String key) throws SikevaDBException public long memorySize(final String key) throws SikevaDBException
{ {
long result; long result;
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -726,17 +829,19 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#memorySize(java.lang.String, java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public long memorySize(final String key, final String subkey) throws SikevaDBException public long memorySize(final String key, final String subkey) throws SikevaDBException
{ {
long result; long result;
if ((key == null) || (subkey == null)) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if ((key == null) || (subkey == null))
{ {
throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "]."); throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "].");
} }
@ -761,8 +866,8 @@ public class FileTreeSikevaDB implements SikevaDB
return result; return result;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#open()
*/ */
@Override @Override
public void open() throws SikevaDBException public void open() throws SikevaDBException
@ -774,15 +879,17 @@ public class FileTreeSikevaDB implements SikevaDB
this.status = Status.OPENED; this.status = Status.OPENED;
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#put(fr.devinsy.sikevadb.core.Element)
*
* @throws SikevaDBException
*/ */
@Override @Override
public void put(final Element element) throws SikevaDBException public void put(final Element element) throws SikevaDBException
{ {
if (element == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (element == null)
{ {
throw new IllegalArgumentException("element is null."); throw new IllegalArgumentException("element is null.");
} }
@ -819,15 +926,17 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#put(java.lang.String, java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public void put(final String key, final String value) throws SikevaDBException public void put(final String key, final String value) throws SikevaDBException
{ {
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -854,15 +963,17 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#put(java.lang.String, java.lang.String, java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public void put(final String key, final String subkey, final String value) throws SikevaDBException public void put(final String key, final String subkey, final String value) throws SikevaDBException
{ {
if ((key == null) || (subkey == null)) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if ((key == null) || (subkey == null))
{ {
throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "]."); throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "].");
} }
@ -890,15 +1001,17 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#remove(java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public void remove(final String key) throws SikevaDBException public void remove(final String key) throws SikevaDBException
{ {
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -921,15 +1034,17 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#remove(java.lang.String, java.lang.String)
*
* @throws SikevaDBException
*/ */
@Override @Override
public void remove(final String key, final String subkey) throws SikevaDBException public void remove(final String key, final String subkey) throws SikevaDBException
{ {
if ((key == null) || (subkey == null)) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if ((key == null) || (subkey == null))
{ {
throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "]."); throw new IllegalArgumentException("Null key detected [key=" + key + "][subkey=" + subkey + "].");
} }
@ -953,15 +1068,17 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#removeMany(java.lang.String, java.lang.String[])
*
* @throws SikevaDBException
*/ */
@Override @Override
public void removeMany(final String key, final String... subkeys) throws SikevaDBException public void removeMany(final String key, final String... subkeys) throws SikevaDBException
{ {
if (key == null) if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else if (key == null)
{ {
throw new IllegalArgumentException("Null key detected."); throw new IllegalArgumentException("Null key detected.");
} }
@ -977,11 +1094,17 @@ public class FileTreeSikevaDB implements SikevaDB
} }
} }
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#renameKey(java.lang.String, java.lang.String)
*/ */
@Override @Override
public void renameKey(final String oldKey, final String newKey) public void renameKey(final String oldKey, final String newKey) throws UnopenedDatabaseException
{
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{ {
this.logger.debug("renameKey starting... [{}][{}]", oldKey, newKey); this.logger.debug("renameKey starting... [{}][{}]", oldKey, newKey);
@ -1017,13 +1140,21 @@ public class FileTreeSikevaDB implements SikevaDB
this.logger.debug("renameKey done."); this.logger.debug("renameKey done.");
} }
}
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#renameSubKey(java.lang.String, java.lang.String, java.lang.String)
*/ */
@Override @Override
public void renameSubKey(final String key, final String oldSubkey, final String newSubkey) throws SikevaDBException public void renameSubKey(final String key, final String oldSubkey, final String newSubkey) throws SikevaDBException
{ {
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{
this.logger.debug("renameSybKey starting... [{}][{}][{}]", oldSubkey, newSubkey); this.logger.debug("renameSybKey starting... [{}][{}][{}]", oldSubkey, newSubkey);
if (key == null) if (key == null)
@ -1063,14 +1194,19 @@ public class FileTreeSikevaDB implements SikevaDB
this.logger.debug("renameSubKey done."); this.logger.debug("renameSubKey done.");
} }
}
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#replaceInValue(java.lang.String, java.lang.String[])
*
* @throws SikevaDBException
*/ */
@Override @Override
public void replaceInValue(final String key, final String... tokens) throws SikevaDBException public void replaceInValue(final String key, final String... tokens) throws SikevaDBException
{
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{ {
this.logger.info("replaceInValue starting... [{}]", key); this.logger.info("replaceInValue starting... [{}]", key);
@ -1088,14 +1224,19 @@ public class FileTreeSikevaDB implements SikevaDB
this.logger.info("replaceInValue done."); this.logger.info("replaceInValue done.");
} }
}
/** /* (non-Javadoc)
* {@inheritDoc} * @see fr.devinsy.sikevadb.core.SikevaDB#replaceInValues(java.lang.String, java.lang.String[])
*
* @throws SikevaDBException
*/ */
@Override @Override
public void replaceInValues(final String key, final String... tokens) throws SikevaDBException public void replaceInValues(final String key, final String... tokens) throws SikevaDBException
{
if (this.status == Status.CLOSED)
{
throw new UnopenedDatabaseException();
}
else
{ {
this.logger.info("replaceInValues starting... [{}]", key); this.logger.info("replaceInValues starting... [{}]", key);
@ -1128,6 +1269,7 @@ public class FileTreeSikevaDB implements SikevaDB
this.logger.info("replaceInValues done."); this.logger.info("replaceInValues done.");
} }
}
/** /**
* *

View file

@ -1,5 +1,5 @@
/** /**
* Copyright (C) 2013-2017 Christian Pierre MOMON, DEVINSY * Copyright (C) 2013-2018 Christian Pierre MOMON, DEVINSY
* *
* This file is part of SikevaDB, simple key value database. * This file is part of SikevaDB, simple key value database.
* *
@ -34,6 +34,7 @@ import org.junit.Test;
import fr.devinsy.sikevadb.core.Element; import fr.devinsy.sikevadb.core.Element;
import fr.devinsy.sikevadb.core.Elements; import fr.devinsy.sikevadb.core.Elements;
import fr.devinsy.sikevadb.core.SikevaDBException; import fr.devinsy.sikevadb.core.SikevaDBException;
import fr.devinsy.sikevadb.core.UnopenedDatabaseException;
import fr.devinsy.util.strings.StringList; import fr.devinsy.util.strings.StringList;
/** /**
@ -607,10 +608,11 @@ public class TreeFileSikevaDBTest
} }
/** /**
* @throws UnopenedDatabaseException
* *
*/ */
@AfterClass @AfterClass
public static void afterClass() public static void afterClass() throws UnopenedDatabaseException
{ {
if (database != null) if (database != null)
{ {