mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-03 13:19:10 +01:00
Merged in feature/integration_test_v2 (pull request #54)
Integration tests for v2
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ import sonia.scm.TypeManager;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -135,11 +134,4 @@ public interface RepositoryManager
|
||||
*/
|
||||
@Override
|
||||
public RepositoryHandler getHandler(String type);
|
||||
|
||||
default Optional<Repository> getByNamespace(String namespace, String name) {
|
||||
return getAll()
|
||||
.stream()
|
||||
.filter(r -> r.getName().equals(name) && r.getNamespace().equals(namespace))
|
||||
.findFirst();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user