Checks: Remove declaration of IOException which is never thrown
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ifa5275c0ad90dbf15bcb21639afd4af191a1dd35
diff --git a/java/com/google/gerrit/plugins/checks/Checks.java b/java/com/google/gerrit/plugins/checks/Checks.java
index 84d19cd..747d81b 100644
--- a/java/com/google/gerrit/plugins/checks/Checks.java
+++ b/java/com/google/gerrit/plugins/checks/Checks.java
@@ -18,7 +18,6 @@
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gwtorm.server.OrmException;
-import java.io.IOException;
import java.util.List;
import java.util.Optional;
@@ -40,14 +39,13 @@
* @param patchSetId the ID of the patch set
* @return the checks, {@link Optional#empty()} if no checks with the given UUID exists
* @throws OrmException if the checks couldn't be retrieved from the storage
- * @throws IOException if the checks couldn't be retrieved from the storage
*/
ImmutableList<Check> getChecks(Project.NameKey projectName, PatchSet.Id patchSetId)
- throws OrmException, IOException;
+ throws OrmException;
/**
* Returns a {@link Optional} holding a single check. {@code Optional.empty()} if the check does
* not exist.
*/
- Optional<Check> getCheck(CheckKey checkKey) throws OrmException, IOException;
+ Optional<Check> getCheck(CheckKey checkKey) throws OrmException;
}
diff --git a/java/com/google/gerrit/plugins/checks/db/NoteDbChecks.java b/java/com/google/gerrit/plugins/checks/db/NoteDbChecks.java
index 9b0b085..81779ce 100644
--- a/java/com/google/gerrit/plugins/checks/db/NoteDbChecks.java
+++ b/java/com/google/gerrit/plugins/checks/db/NoteDbChecks.java
@@ -28,7 +28,6 @@
import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
import com.google.inject.Singleton;
-import java.io.IOException;
import java.util.Optional;
import java.util.stream.Stream;
@@ -51,12 +50,12 @@
@Override
public ImmutableList<Check> getChecks(Project.NameKey projectName, PatchSet.Id psId)
- throws OrmException, IOException {
+ throws OrmException {
return getChecksAsStream(projectName, psId).collect(toImmutableList());
}
@Override
- public Optional<Check> getCheck(CheckKey checkKey) throws OrmException, IOException {
+ public Optional<Check> getCheck(CheckKey checkKey) throws OrmException {
// TODO(gerrit-team): Instead of reading the complete notes map, read just one note.
return getChecksAsStream(checkKey.project(), checkKey.patchSet())
.filter(c -> c.key().checkerUuid().equals(checkKey.checkerUuid()))