diff --git a/src/main/java/nl/tudelft/ewi/gitolite/ManagedConfig.java b/src/main/java/nl/tudelft/ewi/gitolite/ManagedConfig.java index 0534397..7097afc 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/ManagedConfig.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/ManagedConfig.java @@ -57,8 +57,6 @@ public class ManagedConfig { /** * Commit and push changes to the remote. - * @throws InterruptedException If the thread was interrupted. - * @throws IOException If an I/O error occurred. */ @SneakyThrows protected void applyChanges() { diff --git a/src/main/java/nl/tudelft/ewi/gitolite/config/Config.java b/src/main/java/nl/tudelft/ewi/gitolite/config/Config.java index 084de70..c58a307 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/config/Config.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/config/Config.java @@ -41,7 +41,7 @@ public interface Config extends Writable { /** * Remove an identifier - * @param identifier + * @param identifier The identifier to use */ void deleteIdentifierUses(Identifiable identifier); diff --git a/src/main/java/nl/tudelft/ewi/gitolite/git/GitManager.java b/src/main/java/nl/tudelft/ewi/gitolite/git/GitManager.java index 4772230..59199ef 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/git/GitManager.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/git/GitManager.java @@ -39,6 +39,7 @@ public interface GitManager { * not be removed. * * @throws GitException If an exception occurred while using the Git API. + * @throws InterruptedException If the thread was interrupted. */ void remove(String filePattern) throws IOException, GitException, InterruptedException; @@ -48,16 +49,19 @@ public interface GitManager { * * @param uri The URI to clone the git repository from. This cannot be NULL. * - * @throws ServiceUnavailable If the git server is unreachable or otherwise unavailable. + * @throws IOException If an I/O error occurs. * * @throws GitException If an exception occurred while using the Git API. + * @throws InterruptedException If the thread was interrupted. */ void clone(String uri) throws IOException, InterruptedException, GitException; /** * This method initializes a new git repository in the working directory. * + * @throws IOException If an I/O error occurs. * @throws GitException If an exception occurred while using the Git API. + * @throws InterruptedException If the thread was interrupted. */ void init() throws IOException, InterruptedException, GitException; @@ -66,8 +70,8 @@ public interface GitManager { * * @return True if new commits were found and pulled, false otherwise. * - * @throws ServiceUnavailable If the git server is unreachable or otherwise unavailable. - * + * @throws IOException If an I/O error occurs. + * @throws InterruptedException If the thread was interrupted. * @throws GitException If an exception occurred while using the Git API. */ boolean pull() throws IOException, InterruptedException, GitException; @@ -75,8 +79,8 @@ public interface GitManager { /** * Commits all changes to the working directory to the local git repository. * + * @throws InterruptedException If the thread was interrupted. * @throws IOException If the add or commit operations failed. - * * @throws GitException If an exception occurred while using the Git API. */ void commitChanges() throws InterruptedException, IOException, GitException; @@ -85,8 +89,8 @@ public interface GitManager { * This method pushes the locally committed changes to the remote git * repository. * - * @throws ServiceUnavailable If the git server is unreachable or otherwise unavailable. - * + * @throws IOException If the add or commit operations failed. + * @throws InterruptedException If the thread was interrupted. * @throws GitException If an exception occurred while using the Git API. */ void push() throws IOException, InterruptedException, GitException; diff --git a/src/main/java/nl/tudelft/ewi/gitolite/git/NativeGitManagerFactory.java b/src/main/java/nl/tudelft/ewi/gitolite/git/NativeGitManagerFactory.java index 7f40d66..514b224 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/git/NativeGitManagerFactory.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/git/NativeGitManagerFactory.java @@ -3,7 +3,7 @@ import java.io.File; /** - * {@@link GitManager} implementation that returns a {@link NativeGitManager}. + * {@link GitManager} implementation that returns a {@link NativeGitManager}. * * @author Jan-Willem Gmelig Meyling */ diff --git a/src/main/java/nl/tudelft/ewi/gitolite/keystore/KeyStore.java b/src/main/java/nl/tudelft/ewi/gitolite/keystore/KeyStore.java index 2b3c14b..9c1372c 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/keystore/KeyStore.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/keystore/KeyStore.java @@ -27,6 +27,7 @@ public interface KeyStore { * Put a key into the key store * @param key to perist. * @return the persisted key. + * @throws IOException if an I/O error occurred while writing the key. */ PersistedKey put(Key key) throws IOException; diff --git a/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/ConfigKey.java b/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/ConfigKey.java index a66d839..b4fac62 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/ConfigKey.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/ConfigKey.java @@ -27,8 +27,8 @@ public class ConfigKey implements Rule { /** * Create a new {@code ConfigKey}. * - * @param key - * @param value + * @param key Key name. + * @param value Value under key. */ public ConfigKey(String key, Object value) { this.key = key; diff --git a/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/RepositoryRule.java b/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/RepositoryRule.java index d009ffc..939b2ce 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/RepositoryRule.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/RepositoryRule.java @@ -54,8 +54,8 @@ public class RepositoryRule implements Rule { * new RepositoryRuleBlock("foo", new RepositoryRule(RW_PLUS, members); * } * - * @param pattern {@see identifiables} - * @param rules {@see rules} + * @param pattern Pattern to use. + * @param rules Rules to use. */ public RepositoryRule(String pattern, AccessRule... rules) { this(Collections.singletonList(new Identifier(pattern)), Arrays.asList(rules), Collections.emptyList()); @@ -64,9 +64,9 @@ public RepositoryRule(String pattern, AccessRule... rules) { /** * Constructor for {@code RepositoryRuleBlock}. * - * @param patterns {@see identifiables} - * @param rules {@see rules} - * @param configKeys {@see configKeys} + * @param patterns Patterns to use. + * @param rules Rules to use. + * @param configKeys Keys to use. */ public RepositoryRule(final Collection patterns, final Collection rules, diff --git a/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/Writable.java b/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/Writable.java index 8646dcb..09dafa7 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/Writable.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/parser/rules/Writable.java @@ -22,6 +22,7 @@ public interface Writable { /** * Write to a {@code OutputStream}. * @param out {@code OutputStream} to write to. + * @throws IOException If an IO error occurs. */ default void write(OutputStream out) throws IOException { write(new OutputStreamWriter(out)); diff --git a/src/main/java/nl/tudelft/ewi/gitolite/repositories/Repository.java b/src/main/java/nl/tudelft/ewi/gitolite/repositories/Repository.java index ed32398..7f5f6d6 100644 --- a/src/main/java/nl/tudelft/ewi/gitolite/repositories/Repository.java +++ b/src/main/java/nl/tudelft/ewi/gitolite/repositories/Repository.java @@ -17,19 +17,25 @@ public interface Repository { /** * Delete the repository. * - * @throws IOException + * @throws IOException If an I/O error occurs + * @throws UnsupportedOperationException If the operation is not supported + * in the {@link Repository} implementation. */ void delete() throws IOException, UnsupportedOperationException; /** * @return the folder where the bare repository resists. + * + * @throws UnsupportedOperationException If the operation is not supported + * in the {@link Repository} implementation. */ Path getPath() throws UnsupportedOperationException; /** - * @return the size for the repository - * @throws IOException - * @throws UnsupportedOperationException + * @return the size for the repository. + * @throws IOException If an IO error occurs. + * @throws UnsupportedOperationException If the operation is not supported + * in the {@link Repository} implementation. */ FileSize getSize() throws IOException, UnsupportedOperationException;