Remove unthrown Exceptions

Change-Id: I932f199be1ff0d5d597a05a60b0b7328bce6986c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/GerritHookFilter.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/GerritHookFilter.java
index da062bc..d559bc3 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/GerritHookFilter.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/GerritHookFilter.java
@@ -47,24 +47,55 @@
     return commitMessageFetcher.fetch(projectName, commitId);
   }
 
+  /**
+   * Filter patch set created event.
+   * @param hook
+   * @throws IOException
+   * @throws OrmException
+   */
   public void doFilter(PatchSetCreatedEvent hook) throws IOException,
       OrmException {
   }
 
+  /**
+   * Filter comment added event.
+   * @param hook
+   * @throws IOException
+   */
   public void doFilter(CommentAddedEvent hook) throws IOException {
   }
 
+  /**
+   * Filter change merged event.
+   * @param hook
+   * @throws IOException
+   */
   public void doFilter(ChangeMergedEvent hook) throws IOException {
   }
 
+  /**
+   * Filter change abandoned event.
+   * @param changeAbandonedHook
+   * @throws IOException
+   */
   public void doFilter(ChangeAbandonedEvent changeAbandonedHook)
       throws IOException {
   }
 
+  /**
+   * Filter change restored event.
+   * @param changeRestoredHook
+   * @throws IOException
+   */
   public void doFilter(ChangeRestoredEvent changeRestoredHook)
       throws IOException {
   }
 
+  /**
+   * Filter ref updated event.
+   * @param refUpdatedHook
+   * @throws IOException
+   */
   public void doFilter(RefUpdatedEvent refUpdatedHook) throws IOException {
   }
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityComment.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityComment.java
index 7fce725..cec9d3d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityComment.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityComment.java
@@ -84,7 +84,7 @@
     return velocityContext;
   }
 
-  private String velocify(String template, Set<Property> properties) throws IOException {
+  private String velocify(String template, Set<Property> properties) {
     VelocityContext context = getVelocityContext(properties);
     StringWriter w = new StringWriter();
     velocityRuntime.evaluate(context, w, "ItsComment", template);
diff --git a/src/test/java/com/googlesource/gerrit/plugins/hooks/validation/ItsValidateCommentTest.java b/src/test/java/com/googlesource/gerrit/plugins/hooks/validation/ItsValidateCommentTest.java
index e98df6f..9fc9d79 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/hooks/validation/ItsValidateCommentTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/hooks/validation/ItsValidateCommentTest.java
@@ -95,7 +95,7 @@
         "issue'",ret.get(0).getMessage().contains("Missing issue"));
   }
 
-  public void testMandatoryNonMatching() throws CommitValidationException {
+  public void testMandatoryNonMatching() {
     ItsValidateComment ivc = injector.getInstance(ItsValidateComment.class);
     ReceiveCommand command = createMock(ReceiveCommand.class);
     RevCommit commit = createMock(RevCommit.class);
@@ -203,7 +203,7 @@
   }
 
   public void testMandatoryMatchingSingleNonExisting()
-      throws CommitValidationException, IOException {
+      throws IOException {
     ItsValidateComment ivc = injector.getInstance(ItsValidateComment.class);
     ReceiveCommand command = createMock(ReceiveCommand.class);
     RevCommit commit = createMock(RevCommit.class);
diff --git a/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ActionRequestTest.java b/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ActionRequestTest.java
index 3317898..accb92b 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ActionRequestTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ActionRequestTest.java
@@ -19,13 +19,12 @@
 
 import com.googlesource.gerrit.plugins.hooks.testutil.LoggingMockingTestCase;
 
-import java.io.IOException;
 import java.util.Arrays;
 
 public class ActionRequestTest extends LoggingMockingTestCase {
   private Injector injector;
 
-  public void testUnparsedParameterless() throws IOException {
+  public void testUnparsedParameterless() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action");
@@ -33,7 +32,7 @@
         actionRequest.getUnparsed());
   }
 
-  public void testUnparsedNull() throws IOException {
+  public void testUnparsedNull() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest(null);
@@ -41,7 +40,7 @@
         actionRequest.getUnparsed());
   }
 
-  public void testUnparsedSingleParameter() throws IOException {
+  public void testUnparsedSingleParameter() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param");
@@ -49,7 +48,7 @@
         actionRequest.getUnparsed());
   }
 
-  public void testUnparsedMultipleParameters() throws IOException {
+  public void testUnparsedMultipleParameters() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param1 param2");
@@ -57,7 +56,7 @@
         actionRequest.getUnparsed());
   }
 
-  public void testNameParameterless() throws IOException {
+  public void testNameParameterless() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action");
@@ -65,7 +64,7 @@
         actionRequest.getName());
   }
 
-  public void testNameSingleParameter() throws IOException {
+  public void testNameSingleParameter() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param");
@@ -73,7 +72,7 @@
         actionRequest.getName());
   }
 
-  public void testNameMultipleParameters() throws IOException {
+  public void testNameMultipleParameters() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param1 param2");
@@ -81,7 +80,7 @@
         actionRequest.getName());
   }
 
-  public void testNameNull() throws IOException {
+  public void testNameNull() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest(null);
@@ -89,7 +88,7 @@
         actionRequest.getName());
   }
 
-  public void testParameter1Parameterless() throws IOException {
+  public void testParameter1Parameterless() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action");
@@ -97,7 +96,7 @@
         actionRequest.getParameter(1));
   }
 
-  public void testParameter1Null() throws IOException {
+  public void testParameter1Null() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest(null);
@@ -105,7 +104,7 @@
         actionRequest.getParameter(1));
   }
 
-  public void testParameter1SingleParameter() throws IOException {
+  public void testParameter1SingleParameter() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param");
@@ -113,7 +112,7 @@
         actionRequest.getParameter(1));
   }
 
-  public void testParemeter1MultipleParameters() throws IOException {
+  public void testParemeter1MultipleParameters() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param1 param2");
@@ -121,7 +120,7 @@
         actionRequest.getParameter(1));
   }
 
-  public void testParameter3Parameterless() throws IOException {
+  public void testParameter3Parameterless() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action");
@@ -129,7 +128,7 @@
         actionRequest.getParameter(3));
   }
 
-  public void testParameter3Null() throws IOException {
+  public void testParameter3Null() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest(null);
@@ -137,7 +136,7 @@
         actionRequest.getParameter(3));
   }
 
-  public void testParameter3SingleParameter() throws IOException {
+  public void testParameter3SingleParameter() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param");
@@ -145,7 +144,7 @@
         actionRequest.getParameter(3));
   }
 
-  public void testParemeter3With2Parameters() throws IOException {
+  public void testParemeter3With2Parameters() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param1 param2");
@@ -153,7 +152,7 @@
         actionRequest.getParameter(3));
   }
 
-  public void testParemeter3With3Parameters() throws IOException {
+  public void testParemeter3With3Parameters() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param1 param2 " +
@@ -162,7 +161,7 @@
         actionRequest.getParameter(3));
   }
 
-  public void testParemeter3With4Parameters() throws IOException {
+  public void testParemeter3With4Parameters() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param1 param2 " +
@@ -171,7 +170,7 @@
         actionRequest.getParameter(3));
   }
 
-  public void testParametersParameterless() throws IOException {
+  public void testParametersParameterless() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action");
@@ -181,7 +180,7 @@
         Arrays.asList(actionRequest.getParameters()));
   }
 
-  public void testParametersNull() throws IOException {
+  public void testParametersNull() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest(null);
@@ -191,7 +190,7 @@
         Arrays.asList(actionRequest.getParameters()));
   }
 
-  public void testParametersSingleParameter() throws IOException {
+  public void testParametersSingleParameter() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param");
@@ -201,7 +200,7 @@
         Arrays.asList(actionRequest.getParameters()));
   }
 
-  public void testParameters3Parameter() throws IOException {
+  public void testParameters3Parameter() {
     replayMocks();
 
     ActionRequest actionRequest = createActionRequest("action param1 param2 " +
diff --git a/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityCommentTest.java b/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityCommentTest.java
index fe7ab2e..940669f 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityCommentTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/action/AddVelocityCommentTest.java
@@ -42,7 +42,6 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.Writer;
-import java.lang.reflect.InvocationTargetException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -206,8 +205,7 @@
   }
 
   public void testItsWrapperFormatLink1Parameter() throws IOException,
-      SecurityException, NoSuchMethodException, IllegalArgumentException,
-      IllegalAccessException, InvocationTargetException {
+      SecurityException, IllegalArgumentException {
     ActionRequest actionRequest = createMock(ActionRequest.class);
     expect(actionRequest.getParameter(1)).andReturn("inline");
     expect(actionRequest.getParameters()).andReturn(
@@ -242,8 +240,7 @@
   }
 
   public void testItsWrapperFormatLink2Parameters() throws IOException,
-      SecurityException, NoSuchMethodException, IllegalArgumentException,
-      IllegalAccessException, InvocationTargetException {
+      SecurityException, IllegalArgumentException {
     ActionRequest actionRequest = createMock(ActionRequest.class);
     expect(actionRequest.getParameter(1)).andReturn("inline");
     expect(actionRequest.getParameters()).andReturn(