Stop using a list for patterns, as there is at most one pattern

Change-Id: I003728237c1b3c4992e7e15cf5243bcd649e856d
diff --git a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java
index 61c7ebe..701e562 100644
--- a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java
+++ b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/util/IssueExtractor.java
@@ -1,7 +1,6 @@
 package com.googlesource.gerrit.plugins.hooks.util;
 
 import java.util.ArrayList;
-import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -32,20 +31,18 @@
    * @return array of {@link Strings}. Each String being a found issue id.
    */
   public String[] getIssueIds(String haystack) {
-    List<Pattern> commentRegexList = getCommentRegexList();
-    if (commentRegexList == null) return new String[] {};
+    Pattern pattern = getPattern();
+    if (pattern == null) return new String[] {};
 
-    log.debug("Matching '" + haystack + "' against " + commentRegexList);
+    log.debug("Matching '" + haystack + "' against " + pattern.pattern());
 
     ArrayList<String> issues = new ArrayList<String>();
-    for (Pattern pattern : commentRegexList) {
-      Matcher matcher = pattern.matcher(haystack);
+    Matcher matcher = pattern.matcher(haystack);
 
-      while (matcher.find()) {
-        String issueId = extractMatchedWorkItems(matcher);
-        if (issueId != null) {
-          issues.add(issueId);
-        }
+    while (matcher.find()) {
+      String issueId = extractMatchedWorkItems(matcher);
+      if (issueId != null) {
+        issues.add(issueId);
       }
     }
 
@@ -73,15 +70,4 @@
     }
     return ret;
   }
-
-  private List<Pattern> getCommentRegexList() {
-    ArrayList<Pattern> regexList = new ArrayList<Pattern>();
-
-    Pattern pattern = getPattern();
-    if (pattern != null) {
-      regexList.add(pattern);
-    }
-
-    return regexList;
-  }
 }