mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
Remove unused exception constructors
This commit is contained in:
@@ -38,51 +38,11 @@ package sonia.scm.repository;
|
|||||||
*
|
*
|
||||||
* @since 1.14
|
* @since 1.14
|
||||||
*/
|
*/
|
||||||
public class RepositoryIsNotArchivedException extends RepositoryException
|
public class RepositoryIsNotArchivedException extends RepositoryException {
|
||||||
{
|
|
||||||
|
|
||||||
/** Field description */
|
|
||||||
private static final long serialVersionUID = 7728748133123987511L;
|
private static final long serialVersionUID = 7728748133123987511L;
|
||||||
|
|
||||||
//~--- constructors ---------------------------------------------------------
|
public RepositoryIsNotArchivedException() {
|
||||||
|
super("Repository could not be deleted, because it is not archived.");
|
||||||
/**
|
|
||||||
* 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public class DefaultRepositoryManager extends AbstractRepositoryManager {
|
|||||||
|
|
||||||
private void preDelete(Repository toDelete) throws RepositoryException {
|
private void preDelete(Repository toDelete) throws RepositoryException {
|
||||||
if (configuration.isEnableRepositoryArchive() && !toDelete.isArchived()) {
|
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);
|
fireEvent(HandlerEventType.BEFORE_DELETE, toDelete);
|
||||||
getHandler(toDelete).delete(toDelete);
|
getHandler(toDelete).delete(toDelete);
|
||||||
|
|||||||
Reference in New Issue
Block a user