Fix compiler warnings

Change-Id: I630da511df6cff9429c7a2aed5cbb3fd46880bed
diff --git a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGoRestClient.java b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGoRestClient.java
index 784c18a..ae44146 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGoRestClient.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGoRestClient.java
@@ -83,6 +83,8 @@
                 scsKey.branch(),
                 scsKey.commit());
         break;
+      case ARTC:
+      case CD:
       default:
         return Optional.empty();
     }
@@ -101,15 +103,13 @@
     String query;
     switch (key.type()) {
       case SCS:
-        SourceChangeEventKey scsKey = (SourceChangeEventKey) key;
         query =
             String.format(
-                LINKS_ID_URL,
-                scsKey.type().getType(),
-                scsKey.repo(),
-                scsKey.branch(),
-                scsKey.commit());
+                LINKS_ID_URL, key.type().getType(), key.repo(), key.branch(), key.commit());
         break;
+      case ARTC:
+      case CD:
+      case SCC:
       default:
         return Optional.empty();
     }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGraphQlClient.java b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGraphQlClient.java
index 2b0a79a..8265b4a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGraphQlClient.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/eiffel/api/EiffelGraphQlClient.java
@@ -219,6 +219,8 @@
 
         class Node {
           List<Data> links;
+
+          @SuppressWarnings("hiding")
           Meta meta;
         }
       }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/CommitsWalker.java b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/CommitsWalker.java
index 1c9a609..0ad8223 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/CommitsWalker.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/CommitsWalker.java
@@ -99,13 +99,12 @@
 
   CommitsWalker(
       SourceChangeEventKey eventKey, EiffelEventHub eventHub, GitRepositoryManager repoManager)
-      throws RepositoryNotFoundException, IOException, EiffelEventIdLookupException {
+      throws RepositoryNotFoundException, IOException {
     this(eventKey, eventHub, repoManager.openRepository(Project.nameKey(eventKey.repo())));
     this.toClose.add(this.repo);
   }
 
-  CommitsWalker(SourceChangeEventKey eventKey, EiffelEventHub eventHub, Repository repo)
-      throws RepositoryNotFoundException, IOException, EiffelEventIdLookupException {
+  CommitsWalker(SourceChangeEventKey eventKey, EiffelEventHub eventHub, Repository repo) {
     this.eventKey = eventKey;
     this.eventHub = eventHub;
     this.repo = repo;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserImpl.java b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserImpl.java
index e7c9d35..d3ef267 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserImpl.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserImpl.java
@@ -564,12 +564,11 @@
     Optional<UUID> id = eventHub.getExistingId(siblingKey);
     if (id.isPresent()) {
       return id.get();
-    } else {
-      throw new NoSuchEntityException(
-          String.format(
-              "Unable to lookup SCC (%s) event UUID for %s even though it should exist.",
-              key.commit(), key));
     }
+    throw new NoSuchEntityException(
+        String.format(
+            "Unable to lookup SCC (%s) event UUID for %s even though it should exist.",
+            key.commit(), key));
   }
 
   /* Attempt to determine which UUID is used by other events that links to THIS event. */
diff --git a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventHubIT.java b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventHubIT.java
index 97febc0..258045f 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventHubIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventHubIT.java
@@ -82,7 +82,6 @@
   public void getScsForCommitNoBranch() throws Exception {
     EiffelSourceChangeSubmittedEventInfo toCheck =
         (EiffelSourceChangeSubmittedEventInfo) TestUtil.copyGitIdentifier(TestUtil.newScc(), SCS);
-    EventKey key = EventKey.fromEvent(toCheck);
     String repo = toCheck.data.gitIdentifier.repoName;
     String commit = toCheck.data.gitIdentifier.commitId;
     assertFalse(hub.getScsForCommit(repo, commit, List.of()).isPresent());
@@ -100,7 +99,6 @@
   public void getScsForCommitWithBranch() throws Exception {
     EiffelSourceChangeSubmittedEventInfo toCheck =
         (EiffelSourceChangeSubmittedEventInfo) TestUtil.copyGitIdentifier(TestUtil.newScc(), SCS);
-    EventKey key = EventKey.fromEvent(toCheck);
     String repo = toCheck.data.gitIdentifier.repoName;
     String commit = toCheck.data.gitIdentifier.commitId;
     String branch = toCheck.data.gitIdentifier.branch;