From 12202058bdba4e592577db2df3fa65164c495fe8 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Thu, 5 Jul 2012 19:11:38 +0200 Subject: [PATCH] throw ioexception and repositoryexcetion on tags command --- .../scm/repository/api/TagsCommandBuilder.java | 16 +++++++++++++--- .../sonia/scm/repository/spi/TagsCommand.java | 8 +++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/scm-core/src/main/java/sonia/scm/repository/api/TagsCommandBuilder.java b/scm-core/src/main/java/sonia/scm/repository/api/TagsCommandBuilder.java index 2751bd4bdb..e04da18ca0 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/TagsCommandBuilder.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/TagsCommandBuilder.java @@ -39,12 +39,15 @@ import sonia.scm.cache.Cache; import sonia.scm.cache.CacheManager; import sonia.scm.repository.Repository; import sonia.scm.repository.RepositoryCacheKey; +import sonia.scm.repository.RepositoryException; import sonia.scm.repository.Tag; import sonia.scm.repository.Tags; import sonia.scm.repository.spi.TagsCommand; //~--- JDK imports ------------------------------------------------------------ +import java.io.IOException; + import java.util.List; /** @@ -74,6 +77,7 @@ public final class TagsCommandBuilder * * @param cacheManager cache manager * @param logCommand implementation of the {@link TagsCommand} + * @param command * @param repository repository */ TagsCommandBuilder(CacheManager cacheManager, TagsCommand command, @@ -84,15 +88,18 @@ public final class TagsCommandBuilder this.repository = repository; } - //~--- methods -------------------------------------------------------------- + //~--- get methods ---------------------------------------------------------- /** * Returns all tags from the repository. * * * @return tags from the repository + * + * @throws IOException + * @throws RepositoryException */ - public Tags getTags() + public Tags getTags() throws RepositoryException, IOException { Tags tags = null; @@ -146,8 +153,11 @@ public final class TagsCommandBuilder * * * @return + * + * @throws IOException + * @throws RepositoryException */ - private Tags getTagsFromCommand() + private Tags getTagsFromCommand() throws RepositoryException, IOException { List tagList = command.getTags(); diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/TagsCommand.java b/scm-core/src/main/java/sonia/scm/repository/spi/TagsCommand.java index 935dfae0ad..85722109aa 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/TagsCommand.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/TagsCommand.java @@ -33,10 +33,13 @@ package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- +import sonia.scm.repository.RepositoryException; import sonia.scm.repository.Tag; //~--- JDK imports ------------------------------------------------------------ +import java.io.IOException; + import java.util.List; /** @@ -51,6 +54,9 @@ public interface TagsCommand * * * @return + * + * @throws IOException + * @throws RepositoryException */ - public List getTags(); + public List getTags() throws RepositoryException, IOException; }