mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-03 21:29:18 +01:00
Use correct namespace of created repository
This commit is contained in:
@@ -53,13 +53,9 @@ public interface HandlerBase<T extends TypedObject, E extends Exception>
|
||||
/**
|
||||
* Persists a new object.
|
||||
*
|
||||
*
|
||||
* @param object to store
|
||||
*
|
||||
* @throws E
|
||||
* @throws IOException
|
||||
* @return The persisted object.
|
||||
*/
|
||||
public void create(T object) throws E, IOException;
|
||||
public T create(T object) throws E, IOException;
|
||||
|
||||
/**
|
||||
* Removes a persistent object.
|
||||
|
||||
@@ -35,7 +35,6 @@ package sonia.scm;
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
|
||||
@@ -78,9 +77,9 @@ public class ManagerDecorator<T extends ModelObject, E extends Exception>
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void create(T object) throws E, IOException
|
||||
public T create(T object) throws E, IOException
|
||||
{
|
||||
decorated.create(object);
|
||||
return decorated.create(object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,23 +38,20 @@ package sonia.scm.repository;
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.io.Resources;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.ConfigurationException;
|
||||
import sonia.scm.io.CommandResult;
|
||||
import sonia.scm.io.ExtendedCommand;
|
||||
import sonia.scm.io.FileSystem;
|
||||
import sonia.scm.store.ConfigurationStoreFactory;
|
||||
import sonia.scm.util.IOUtil;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.net.URL;
|
||||
import sonia.scm.store.ConfigurationStoreFactory;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -108,7 +105,7 @@ public abstract class AbstractSimpleRepositoryHandler<C extends SimpleRepository
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
@Override
|
||||
public void create(Repository repository)
|
||||
public Repository create(Repository repository)
|
||||
throws RepositoryException, IOException
|
||||
{
|
||||
File directory = getDirectory(repository);
|
||||
@@ -125,6 +122,7 @@ public abstract class AbstractSimpleRepositoryHandler<C extends SimpleRepository
|
||||
fileSystem.create(directory);
|
||||
create(repository, directory);
|
||||
postCreate(repository, directory);
|
||||
return repository;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -142,6 +140,7 @@ public abstract class AbstractSimpleRepositoryHandler<C extends SimpleRepository
|
||||
|
||||
Throwables.propagateIfPossible(ex, RepositoryException.class,
|
||||
IOException.class);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user