Merge "Fix color in account dropdown"
diff --git a/java/com/google/gerrit/entities/Account.java b/java/com/google/gerrit/entities/Account.java
index cd3b27a..18fcef3 100644
--- a/java/com/google/gerrit/entities/Account.java
+++ b/java/com/google/gerrit/entities/Account.java
@@ -196,9 +196,9 @@
    * <p>Example output:
    *
    * <ul>
-   *   <li>{@code A U. Thor &lt;author@example.com&gt;}: full populated
+   *   <li>{@code A U. Thor <author@example.com>}: full populated
    *   <li>{@code A U. Thor (12)}: missing email address
-   *   <li>{@code Anonymous Coward &lt;author@example.com&gt;}: missing name
+   *   <li>{@code Anonymous Coward <author@example.com>}: missing name
    *   <li>{@code Anonymous Coward (12)}: missing name and email address
    * </ul>
    */
diff --git a/java/com/google/gerrit/server/account/AuthRequest.java b/java/com/google/gerrit/server/account/AuthRequest.java
index 50ed532..cceda70 100644
--- a/java/com/google/gerrit/server/account/AuthRequest.java
+++ b/java/com/google/gerrit/server/account/AuthRequest.java
@@ -49,20 +49,20 @@
     }
 
     /** Create a request for a local username, such as from LDAP. */
-    public AuthRequest createForUser(String username) {
+    public AuthRequest createForUser(String userName) {
       AuthRequest r =
           new AuthRequest(
-              externalIdKeyFactory.create(SCHEME_GERRIT, username), externalIdKeyFactory);
-      r.setUserName(username);
+              externalIdKeyFactory.create(SCHEME_GERRIT, userName), externalIdKeyFactory);
+      r.setUserName(userName);
       return r;
     }
 
     /** Create a request for an external username. */
-    public AuthRequest createForExternalUser(String username) {
+    public AuthRequest createForExternalUser(String userName) {
       AuthRequest r =
           new AuthRequest(
-              externalIdKeyFactory.create(SCHEME_EXTERNAL, username), externalIdKeyFactory);
-      r.setUserName(username);
+              externalIdKeyFactory.create(SCHEME_EXTERNAL, userName), externalIdKeyFactory);
+      r.setUserName(userName);
       return r;
     }
 
diff --git a/java/com/google/gerrit/server/edit/ModificationTarget.java b/java/com/google/gerrit/server/edit/ModificationTarget.java
index 0de0149..86de812 100644
--- a/java/com/google/gerrit/server/edit/ModificationTarget.java
+++ b/java/com/google/gerrit/server/edit/ModificationTarget.java
@@ -52,21 +52,21 @@
   /** A specific patchset commit is the target of the modification. */
   class PatchsetCommit implements ModificationTarget {
 
-    private final PatchSet patchset;
+    private final PatchSet patchSet;
 
-    PatchsetCommit(PatchSet patchset) {
-      this.patchset = patchset;
+    PatchsetCommit(PatchSet patchSet) {
+      this.patchSet = patchSet;
     }
 
     @Override
     public void ensureTargetMayBeModifiedDespiteExistingEdit(ChangeEdit changeEdit)
         throws InvalidChangeOperationException {
-      if (!isBasedOn(changeEdit, patchset)) {
+      if (!isBasedOn(changeEdit, patchSet)) {
         throw new InvalidChangeOperationException(
             String.format(
                 "Only the patch set %s on which the existing change edit is based may be modified "
                     + "(specified patch set: %s)",
-                changeEdit.getBasePatchSet().id(), patchset.id()));
+                changeEdit.getBasePatchSet().id(), patchSet.id()));
       }
     }
 
@@ -78,7 +78,7 @@
     @Override
     public void ensureNewEditMayBeBasedOnTarget(Change change)
         throws InvalidChangeOperationException {
-      PatchSet.Id patchSetId = patchset.id();
+      PatchSet.Id patchSetId = patchSet.id();
       PatchSet.Id currentPatchSetId = change.currentPatchSetId();
       if (!patchSetId.equals(currentPatchSetId)) {
         throw new InvalidChangeOperationException(
@@ -91,13 +91,13 @@
     @Override
     public RevCommit getCommit(Repository repository) throws IOException {
       try (RevWalk revWalk = new RevWalk(repository)) {
-        return revWalk.parseCommit(patchset.commitId());
+        return revWalk.parseCommit(patchSet.commitId());
       }
     }
 
     @Override
     public PatchSet getBasePatchset() {
-      return patchset;
+      return patchSet;
     }
   }
 
diff --git a/java/com/google/gerrit/server/plugins/TestServerPlugin.java b/java/com/google/gerrit/server/plugins/TestServerPlugin.java
index 3751c3f..cd5d5e3 100644
--- a/java/com/google/gerrit/server/plugins/TestServerPlugin.java
+++ b/java/com/google/gerrit/server/plugins/TestServerPlugin.java
@@ -28,7 +28,7 @@
       String name,
       String pluginCanonicalWebUrl,
       PluginUser user,
-      ClassLoader classloader,
+      ClassLoader classLoader,
       String sysName,
       String httpName,
       String sshName,
@@ -42,10 +42,10 @@
         null,
         null,
         dataDir,
-        classloader,
+        classLoader,
         null,
         GerritRuntime.DAEMON);
-    this.classLoader = classloader;
+    this.classLoader = classLoader;
     this.sysName = sysName;
     this.httpName = httpName;
     this.sshName = sshName;
diff --git a/java/com/google/gerrit/server/restapi/change/DeleteVote.java b/java/com/google/gerrit/server/restapi/change/DeleteVote.java
index 7ee38d4..45d1f5a 100644
--- a/java/com/google/gerrit/server/restapi/change/DeleteVote.java
+++ b/java/com/google/gerrit/server/restapi/change/DeleteVote.java
@@ -81,7 +81,7 @@
   private final RemoveReviewerControl removeReviewerControl;
   private final ProjectCache projectCache;
   private final MessageIdGenerator messageIdGenerator;
-  private final AddToAttentionSetOp.Factory attentionSetOpfactory;
+  private final AddToAttentionSetOp.Factory attentionSetOpFactory;
   private final Provider<CurrentUser> currentUserProvider;
 
   @Inject
@@ -108,7 +108,7 @@
     this.removeReviewerControl = removeReviewerControl;
     this.projectCache = projectCache;
     this.messageIdGenerator = messageIdGenerator;
-    this.attentionSetOpfactory = attentionSetOpFactory;
+    this.attentionSetOpFactory = attentionSetOpFactory;
     this.currentUserProvider = currentUserProvider;
   }
 
@@ -149,7 +149,7 @@
       if (!r.getReviewerUser().getAccountId().equals(currentUserProvider.get().getAccountId())) {
         bu.addOp(
             change.getId(),
-            attentionSetOpfactory.create(
+            attentionSetOpFactory.create(
                 r.getReviewerUser().getAccountId(),
                 /* reason= */ "Their vote was deleted",
                 /* notify= */ false));
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts
index 002ac56..74f430c 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts
@@ -236,7 +236,7 @@
     name: string,
     expression?: SubmitRequirementExpressionInfo
   ) {
-    if (!expression) return '';
+    if (!expression?.expression) return '';
     return html`
       <div class="section">
         <div class="sectionIcon"></div>
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements.ts b/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements.ts
index 6406e3c..986db65 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements.ts
@@ -192,7 +192,9 @@
         <td>
           <gr-endpoint-decorator
             class="votes-cell"
-            name="${`submit-requirement-${charsOnly(requirement.name)}`}"
+            name="${`submit-requirement-${charsOnly(
+              requirement.name
+            ).toLowerCase()}`}"
           >
             <gr-endpoint-param
               name="change"
diff --git a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts
index 9013088..1738aaa 100644
--- a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts
+++ b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts
@@ -93,6 +93,7 @@
           padding: 1px;
           border-radius: var(--border-radius);
           line-height: var(--gr-vote-chip-width, 16px);
+          color: var(--vote-text-color);
         }
         .vote-chip {
           position: relative;
diff --git a/tools/BUILD b/tools/BUILD
index 5d8491a..3fd2a0f 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -180,7 +180,7 @@
         "-Xep:EqualsUsingHashCode:ERROR",
         "-Xep:EqualsWrongThing:ERROR",
         "-Xep:ErroneousThreadPoolConstructorChecker:ERROR",
-        # "-Xep:EscapedEntity:WARN",
+        "-Xep:EscapedEntity:WARN",
         "-Xep:ExpectedExceptionChecker:ERROR",
         "-Xep:ExtendingJUnitAssert:ERROR",
         "-Xep:ExtendsAutoValue:ERROR",
@@ -223,7 +223,7 @@
         "-Xep:Incomparable:ERROR",
         "-Xep:IncompatibleArgumentType:ERROR",
         "-Xep:IncompatibleModifiers:ERROR",
-        # "-Xep:InconsistentCapitalization:WARN",
+        "-Xep:InconsistentCapitalization:ERROR",
         "-Xep:InconsistentHashCode:ERROR",
         "-Xep:IncrementInForLoopAndHeader:ERROR",
         "-Xep:IndexOfChar:ERROR",