Merge branch 'stable-2.14' into stable-2.15

* stable-2.14:
  Fix support for Velocity and Soy comments
  Use map.computeIfAbsent
  Fix Eclipse warnings about raw types
  Rename parameter to comply with naming convention
  Replace anonymous class with ThreadLocal.withInitial
  Use Logger's built-in formatting
  Move array designators to the type
  Clarify constant declaration
  Replace FluentIterable with Java Stream
  Remove unnecessary import
  Avoid redundant array creation
  Remove redundant specification of type arguments
  Remove redundant semicolons
  Apply google-java-format to all files

Change-Id: Iac4701bb1ab3bc815fb5835387a17a4572405447
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java
index 63223ff..1cd2b74 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java
@@ -28,17 +28,17 @@
 
 public class InitIts implements InitStep {
 
-  public static String COMMENT_LINK_SECTION = "commentlink";
+  protected static final String COMMENT_LINK_SECTION = "commentlink";
 
   public static enum TrueFalseEnum {
     TRUE,
-    FALSE;
+    FALSE
   }
 
   public static enum ItsIntegration {
     ENABLED,
     DISABLED,
-    ENFORCED;
+    ENFORCED
   }
 
   private final String pluginName;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java
index 20fca28..99fe80c 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java
@@ -14,10 +14,8 @@
 
 package com.googlesource.gerrit.plugins.its.base.its;
 
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.collect.FluentIterable;
+import static java.util.stream.Collectors.toList;
+
 import com.google.gerrit.common.data.RefConfigSection;
 import com.google.gerrit.extensions.annotations.PluginName;
 import com.google.gerrit.extensions.api.projects.CommentLinkInfo;
@@ -41,6 +39,7 @@
 import com.googlesource.gerrit.plugins.its.base.validation.ItsAssociationPolicy;
 import java.util.Collections;
 import java.util.List;
+import java.util.Optional;
 import java.util.regex.Pattern;
 import org.eclipse.jgit.lib.Config;
 import org.slf4j.Logger;
@@ -57,12 +56,7 @@
   private final Config gerritConfig;
 
   private static final ThreadLocal<Project.NameKey> currentProjectName =
-      new ThreadLocal<Project.NameKey>() {
-        @Override
-        protected Project.NameKey initialValue() {
-          return null;
-        }
-      };
+      ThreadLocal.withInitial(() -> null);
 
   public static void setCurrentProjectName(Project.NameKey projectName) {
     currentProjectName.set(projectName);
@@ -102,7 +96,7 @@
       RefUpdatedEvent e = (RefUpdatedEvent) event;
       return isEnabled(e.getProjectNameKey(), e.getRefName());
     } else {
-      log.debug("Event " + event + " not recognised and ignored");
+      log.debug("Event {} not recognised and ignored", event);
       return false;
     }
   }
@@ -111,13 +105,9 @@
     ProjectState projectState = projectCache.get(projectNK);
     if (projectState == null) {
       log.error(
-          "Failed to check if "
-              + pluginName
-              + " is enabled for project "
-              + projectNK.get()
-              + ": Project "
-              + projectNK.get()
-              + " not found");
+          "Failed to check if {} is enabled for project {}: Project not found",
+          pluginName,
+          projectNK.get());
       return false;
     }
 
@@ -191,22 +181,11 @@
    */
   public Pattern getIssuePattern() {
     Optional<String> match =
-        FluentIterable.from(getCommentLinkInfo(getCommentLinkName()))
-            .filter(
-                new Predicate<CommentLinkInfo>() {
-                  @Override
-                  public boolean apply(CommentLinkInfo input) {
-                    return input.match != null && !input.match.trim().isEmpty();
-                  }
-                })
-            .transform(
-                new Function<CommentLinkInfo, String>() {
-                  @Override
-                  public String apply(CommentLinkInfo input) {
-                    return input.match;
-                  }
-                })
-            .last();
+        getCommentLinkInfo(getCommentLinkName())
+            .stream()
+            .filter(input -> input.match != null && !input.match.trim().isEmpty())
+            .map(input -> input.match)
+            .reduce((a, b) -> b);
 
     String defPattern = gerritConfig.getString("commentlink", getCommentLinkName(), "match");
 
@@ -214,7 +193,7 @@
       return null;
     }
 
-    return Pattern.compile(match.or(defPattern));
+    return Pattern.compile(match.orElse(defPattern));
   }
 
   /**
@@ -278,15 +257,10 @@
     NameKey projectName = currentProjectName.get();
     if (projectName != null) {
       List<CommentLinkInfo> commentlinks = projectCache.get(projectName).getCommentLinks();
-      return FluentIterable.from(commentlinks)
-          .filter(
-              new Predicate<CommentLinkInfo>() {
-                @Override
-                public boolean apply(CommentLinkInfo input) {
-                  return input.name.equals(commentlinkName);
-                }
-              })
-          .toList();
+      return commentlinks
+          .stream()
+          .filter(input -> input.name.equals(commentlinkName))
+          .collect(toList());
     }
     return Collections.emptyList();
   }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsHookEnabledConfigEntry.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsHookEnabledConfigEntry.java
index 85cbfb3..37f1851 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsHookEnabledConfigEntry.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsHookEnabledConfigEntry.java
@@ -28,7 +28,7 @@
     super(
         "Enable " + pluginName + " integration",
         "false",
-        Arrays.asList(new String[] {"false", "true", "enforced"}),
+        Arrays.asList("false", "true", "enforced"),
         true);
     this.pluginName = pluginName;
     this.pluginCfgFactory = pluginCfgFactory;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/NoopItsFacade.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/NoopItsFacade.java
index 267a4b8..de4acd9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/NoopItsFacade.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/NoopItsFacade.java
@@ -35,7 +35,7 @@
   public void addRelatedLink(String issueId, URL relatedUrl, String description)
       throws IOException {
     if (log.isDebugEnabled()) {
-      log.debug("addRelatedLink({},{},{})", new Object[] {issueId, relatedUrl, description});
+      log.debug("addRelatedLink({},{},{})", issueId, relatedUrl, description);
     }
   }
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractor.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractor.java
index daed8d8..5c344f1 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractor.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractor.java
@@ -79,7 +79,7 @@
     Pattern pattern = itsConfig.getIssuePattern();
     if (pattern == null) return new String[] {};
 
-    log.debug("Matching '" + haystack + "' against " + pattern.pattern());
+    log.debug("Matching '{}' against {}", haystack, pattern.pattern());
 
     Set<String> issues = Sets.newHashSet();
     Matcher matcher = pattern.matcher(haystack);
@@ -96,7 +96,7 @@
   }
 
   /**
-   * Helper funcion for {@link #getIssueIds(String, String)}.
+   * Helper function for {@link #getIssueIds(String, String)}.
    *
    * <p>Adds a text's issues for a given occurrence to the map returned by {@link
    * #getIssueIds(String, String)}.
@@ -107,11 +107,7 @@
    */
   private void addIssuesOccurrence(String text, String occurrence, Map<String, Set<String>> map) {
     for (String issue : getIssueIds(text)) {
-      Set<String> occurrences = map.get(issue);
-      if (occurrences == null) {
-        occurrences = Sets.newLinkedHashSet();
-        map.put(issue, occurrences);
-      }
+      Set<String> occurrences = map.computeIfAbsent(issue, k -> Sets.newLinkedHashSet());
       occurrences.add(occurrence);
     }
   }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsAssociationPolicy.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsAssociationPolicy.java
index 4cdfa5b..4e08b62 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsAssociationPolicy.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsAssociationPolicy.java
@@ -17,5 +17,5 @@
 public enum ItsAssociationPolicy {
   MANDATORY,
   SUGGESTED,
-  OPTIONAL;
+  OPTIONAL
 }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
index 1b5780b..41dc9fa 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
@@ -94,7 +94,7 @@
         Rule rule = ruleFactory.create(subsection);
         Collection<String> keys = cfg.getNames(RULE_SECTION, subsection);
         for (String key : keys) {
-          String values[] = cfg.getStringList(RULE_SECTION, subsection, key);
+          String[] values = cfg.getStringList(RULE_SECTION, subsection, key);
           if (ACTION_KEY.equals(key)) {
             for (String value : values) {
               ActionRequest actionRequest = actionRequestFactory.create(value);
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddSoyComment.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddSoyComment.java
index 3068164..bbad6e9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddSoyComment.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddSoyComment.java
@@ -62,7 +62,7 @@
     this.its = its;
   }
 
-  private HashMap getSoyContext(Set<Property> properties) {
+  private HashMap<String, Object> getSoyContext(Set<Property> properties) {
     HashMap<String, Object> soyContext = new HashMap<>();
     for (Property property : properties) {
       String key = property.getKey();
@@ -95,7 +95,7 @@
 
     builder.add(content, templatePath.toAbsolutePath().toString());
 
-    HashMap context = getSoyContext(properties);
+    HashMap<String, Object> context = getSoyContext(properties);
 
     SoyTofu.Renderer renderer =
         builder
@@ -119,7 +119,7 @@
     String template = null;
     String templateName = actionRequest.getParameter(1);
     if (templateName.isEmpty()) {
-      log.error("No template name given in " + actionRequest);
+      log.error("No template name given in {}", actionRequest);
     } else {
       template = templateName;
     }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddStandardComment.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddStandardComment.java
index 9753cf3..eb8c4a6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddStandardComment.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddStandardComment.java
@@ -51,15 +51,14 @@
     return ret;
   }
 
-  private String getCommentChangeEvent(String Action, String prefix, Map<String, String> map) {
+  private String getCommentChangeEvent(String action, String prefix, Map<String, String> map) {
     String ret = "";
-    String changeNumber = Strings.nullToEmpty(map.get("change-number"));
-    changeNumber = Strings.nullToEmpty(map.get("changeNumber"));
+    String changeNumber = getValueFromMap(map, "", "change-number", "changeNumber");
     if (!changeNumber.isEmpty()) {
       changeNumber += " ";
     }
-    ret += "Change " + changeNumber + Action;
-    String submitter = formatPerson(prefix, map);
+    ret += "Change " + changeNumber + action;
+    String submitter = getValueFromMap(map, prefix, "-name", "Name", "-username", "Username");
     if (!submitter.isEmpty()) {
       ret += " by " + submitter;
     }
@@ -71,14 +70,23 @@
     if (!reason.isEmpty()) {
       ret += "\n\nReason:\n" + reason;
     }
-    String url = Strings.nullToEmpty(map.get("change-url"));
-    url = Strings.nullToEmpty(map.get("changeUrl"));
+    String url = getValueFromMap(map, "", "change-url", "changeUrl");
     if (!url.isEmpty()) {
       ret += "\n\n" + its.createLinkForWebui(url, url);
     }
     return ret;
   }
 
+  private String getValueFromMap(Map<String, String> map, String keyPrefix, String... keyOptions) {
+    for (String key : keyOptions) {
+      String ret = Strings.nullToEmpty(map.get(keyPrefix + key));
+      if (!ret.isEmpty()) {
+        return ret;
+      }
+    }
+    return "";
+  }
+
   private String getCommentChangeAbandoned(Map<String, String> map) {
     return getCommentChangeEvent("abandoned", "abandoner", map);
   }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityComment.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityComment.java
index 6fbdb86..13a6655 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityComment.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityComment.java
@@ -96,14 +96,14 @@
       template = StringUtils.join(templateParameters, " ");
     } else {
       if (templateName.isEmpty()) {
-        log.error("No template name given in " + actionRequest);
+        log.error("No template name given in {}", actionRequest);
       } else {
         Path templateDir = sitePath.resolve(ITS_TEMPLATE_DIR);
         Path templatePath = templateDir.resolve(templateName + ".vm");
         if (Files.isReadable(templatePath)) {
           template = new String(Files.readAllBytes(templatePath));
         } else {
-          log.error("Cannot read template " + templatePath);
+          log.error("Cannot read template {}", templatePath);
         }
       }
     }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java
index 870b9f4..80cbfd3 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java
@@ -50,7 +50,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Test");
+    String[] ret = issueExtractor.getIssueIds("Test");
     assertEquals("Number of found ids do not match", 0, ret.length);
   }
 
@@ -62,7 +62,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Test");
+    String[] ret = issueExtractor.getIssueIds("Test");
     assertEquals("Number of found ids do not match", 0, ret.length);
 
     assertLogMessageContains("Matching");
@@ -76,7 +76,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("bug#4711");
+    String[] ret = issueExtractor.getIssueIds("bug#4711");
     assertEquals("Number of found ids do not match", 0, ret.length);
 
     assertLogMessageContains("Matching");
@@ -90,7 +90,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("bug#4711");
+    String[] ret = issueExtractor.getIssueIds("bug#4711");
     assertEquals("Number of found ids do not match", 1, ret.length);
     assertEquals("First found issue id do not match", "4711", ret[0]);
 
@@ -105,7 +105,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+    String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
     assertEquals("Number of found ids do not match", 1, ret.length);
     assertEquals("Found issue id does not match", "4711", ret[0]);
 
@@ -120,7 +120,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+    String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
     assertEquals("Number of found ids do not match", 1, ret.length);
     assertEquals("Found issue id does not match", "bug#4711", ret[0]);
 
@@ -135,7 +135,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+    String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
     assertEquals("Number of found ids do not match", 1, ret.length);
     assertEquals("Found issue id does not match", "4", ret[0]);
 
@@ -150,7 +150,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+    String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
     assertEquals("Number of found ids do not match", 1, ret.length);
     assertEquals("Found issue id does not match", "711", ret[0]);
 
@@ -165,7 +165,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar bug#123");
+    String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar bug#123");
     assertEquals("Number of found ids do not match", 3, ret.length);
     List<String> retList = Arrays.asList(ret);
     assertTrue("4711 not among the extracted ids", retList.contains("4711"));
@@ -183,7 +183,7 @@
 
     replayMocks();
 
-    String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar\n" + "bug#123 baz bug#42");
+    String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar\n" + "bug#123 baz bug#42");
     assertEquals("Number of found ids do not match", 3, ret.length);
     List<String> retList = Arrays.asList(ret);
     assertTrue("4711 not among the extracted ids", retList.contains("4711"));
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
index ebaecce..981eeae 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
@@ -247,7 +247,7 @@
     Property propertyApproval2 = createMock(Property.class);
     expect(propertyAttributeExtractor.extractFrom(approvalAttribute2))
         .andReturn(Sets.newHashSet(propertyApproval2));
-    ApprovalAttribute approvalAttributes[] = {approvalAttribute1, approvalAttribute2};
+    ApprovalAttribute[] approvalAttributes = {approvalAttribute1, approvalAttribute2};
     event.approvals = Suppliers.ofInstance(approvalAttributes);
 
     event.comment = "testComment";
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddCommentTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddCommentTest.java
index 912f4d1..3039b12 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddCommentTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddCommentTest.java
@@ -37,7 +37,7 @@
     replayMocks();
 
     AddComment addComment = createAddComment();
-    addComment.execute("4711", actionRequest, new HashSet<Property>());
+    addComment.execute("4711", actionRequest, new HashSet<>());
   }
 
   public void testPlain() throws IOException {
@@ -49,7 +49,7 @@
     replayMocks();
 
     AddComment addComment = createAddComment();
-    addComment.execute("4711", actionRequest, new HashSet<Property>());
+    addComment.execute("4711", actionRequest, new HashSet<>());
   }
 
   private AddComment createAddComment() {
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityCommentTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityCommentTest.java
index a8ca659..61042a4 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityCommentTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/AddVelocityCommentTest.java
@@ -61,7 +61,7 @@
     replayMocks();
 
     AddVelocityComment addVelocityComment = createAddVelocityComment();
-    addVelocityComment.execute("4711", actionRequest, new HashSet<Property>());
+    addVelocityComment.execute("4711", actionRequest, new HashSet<>());
 
     assertLogMessageContains("No template name");
   }
@@ -85,7 +85,7 @@
     replayMocks();
 
     AddVelocityComment addVelocityComment = createAddVelocityComment();
-    addVelocityComment.execute("4711", actionRequest, new HashSet<Property>());
+    addVelocityComment.execute("4711", actionRequest, new HashSet<>());
   }
 
   public void testInlineWithMultipleParameters() throws IOException {
@@ -238,7 +238,7 @@
     replayMocks();
 
     AddVelocityComment addVelocityComment = createAddVelocityComment();
-    addVelocityComment.execute("4711", actionRequest, new HashSet<Property>());
+    addVelocityComment.execute("4711", actionRequest, new HashSet<>());
 
     VelocityContext context = contextCapture.getValue();
     Object itsAdapterObj = context.get("its");
@@ -275,7 +275,7 @@
     replayMocks();
 
     AddVelocityComment addVelocityComment = createAddVelocityComment();
-    addVelocityComment.execute("4711", actionRequest, new HashSet<Property>());
+    addVelocityComment.execute("4711", actionRequest, new HashSet<>());
 
     VelocityContext context = contextCapture.getValue();
     Object itsAdapterObj = context.get("its");
@@ -295,7 +295,7 @@
     replayMocks();
 
     AddVelocityComment addVelocityComment = createAddVelocityComment();
-    addVelocityComment.execute("4711", actionRequest, new HashSet<Property>());
+    addVelocityComment.execute("4711", actionRequest, new HashSet<>());
 
     assertLogMessageContains("non-existing-template");
   }
@@ -320,7 +320,7 @@
     replayMocks();
 
     AddVelocityComment addVelocityComment = createAddVelocityComment();
-    addVelocityComment.execute("4711", actionRequest, new HashSet<Property>());
+    addVelocityComment.execute("4711", actionRequest, new HashSet<>());
   }
 
   public void testTemplateMultipleParametersAndProperties() throws IOException {
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/LogEventTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/LogEventTest.java
index 22a4288..99fa2c3 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/LogEventTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/action/LogEventTest.java
@@ -37,7 +37,7 @@
     replayMocks();
 
     LogEvent logEvent = createLogEvent();
-    logEvent.execute("4711", actionRequest, new HashSet<Property>());
+    logEvent.execute("4711", actionRequest, new HashSet<>());
   }
 
   public void testLevelDefault() throws IOException {