Remove unused exception constructors

This commit is contained in:
René Pfeuffer
2018-08-03 08:40:01 +02:00
parent f0f57de4b5
commit ebe3ef8c3e
2 changed files with 4 additions and 44 deletions

View File

@@ -38,51 +38,11 @@ package sonia.scm.repository;
*
* @since 1.14
*/
public class RepositoryIsNotArchivedException extends RepositoryException
{
public class RepositoryIsNotArchivedException extends RepositoryException {
/** Field description */
private static final long serialVersionUID = 7728748133123987511L;
//~--- constructors ---------------------------------------------------------
/**
* Constructs ...
*
*/
public RepositoryIsNotArchivedException() {}
/**
* Constructs ...
*
*
* @param message
*/
public RepositoryIsNotArchivedException(String message)
{
super(message);
}
/**
* Constructs ...
*
*
* @param cause
*/
public RepositoryIsNotArchivedException(Throwable cause)
{
super(cause);
}
/**
* Constructs ...
*
*
* @param message
* @param cause
*/
public RepositoryIsNotArchivedException(String message, Throwable cause)
{
super(message, cause);
public RepositoryIsNotArchivedException() {
super("Repository could not be deleted, because it is not archived.");
}
}

View File

@@ -172,7 +172,7 @@ public class DefaultRepositoryManager extends AbstractRepositoryManager {
private void preDelete(Repository toDelete) throws RepositoryException {
if (configuration.isEnableRepositoryArchive() && !toDelete.isArchived()) {
throw new RepositoryIsNotArchivedException("Repository could not deleted, because it is not archived.");
throw new RepositoryIsNotArchivedException();
}
fireEvent(HandlerEventType.BEFORE_DELETE, toDelete);
getHandler(toDelete).delete(toDelete);