Merge "Merge branch 'stable-3.2' into master"
diff --git a/Documentation/dev-eclipse.txt b/Documentation/dev-eclipse.txt
index 742cf42..bbe227a 100644
--- a/Documentation/dev-eclipse.txt
+++ b/Documentation/dev-eclipse.txt
@@ -4,7 +4,8 @@
This document is about configuring Gerrit Code Review into an
Eclipse workspace for development.
-Java 8 or later SDK is required.
+Java 11 or later SDK is required.
+Otherwise, java 8 can still be used for now as described below.
[[setup]]
== Project Setup
@@ -30,6 +31,10 @@
----
First, generate the Eclipse project by running the `tools/eclipse/project.py` script.
+If running Eclipse on Java 8, add the extra parameter
+`-e='--java_toolchain=//tools:error_prone_warnings_toolchain'`
+for generating a compatible project.
+
Then, in Eclipse, choose 'Import existing project' and select the `gerrit` project
from the current working directory.
@@ -79,15 +84,16 @@
link:dev-build-plugins.html#_bundle_custom_plugin_in_release_war[bundling in release.war]
and run `tools/eclipse/project.py`.
-[[Newer Java versions]]
+== Java Versions
-Java 9 and later are supported, but some adjustments must be done, because
-Java 8 is still the default:
+Java 11 is supported as a default, but some adjustments must be done for other JDKs:
* Add JRE, e.g.: directory: /usr/lib64/jvm/java-9-openjdk, name: java-9-openjdk-9
* Change execution environment for gerrit project to: JavaSE-9 (java-9-openjdk-9)
* Check that compiler compliance level in gerrit project is set to: 9
+Moreover, the actual java 11 language features are not supported yet.
+
[[Formatting]]
== Code Formatter Settings
diff --git a/Documentation/dev-intellij.txt b/Documentation/dev-intellij.txt
index b67d546..149b14a 100644
--- a/Documentation/dev-intellij.txt
+++ b/Documentation/dev-intellij.txt
@@ -9,7 +9,7 @@
<<dev-bazel#installation,Building with Bazel - Installation>>.
It's strongly recommended to verify you can build your Gerrit tree with Bazel
-for Java 8 from the command line first. Ensure that at least
+for Java 11 from the command line first. Ensure that at least
`bazel build gerrit` runs successfully before you proceed.
=== IntelliJ version and Bazel plugin
@@ -21,12 +21,12 @@
Also note that the version of the Bazel plugin used in turn may or may not be
compatible with the Bazel version used.
-In addition, Java 8 must be specified on your path or via `JAVA_HOME` so that
+In addition, Java 11 must be specified on your path or via `JAVA_HOME` so that
building with Bazel via the Bazel plugin is possible.
TIP: If the synchronization of the project with the BUILD files using the Bazel
plugin fails and IntelliJ reports the error **Could not get Bazel roots**, this
-indicates that the Bazel plugin couldn't find Java 8.
+indicates that the Bazel plugin couldn't find Java 11.
=== Installation of IntelliJ IDEA
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
index 20cc207..5a345f2 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
@@ -408,6 +408,16 @@
isOwner: selfId === ownerId,
});
}
+
+ _computeCommaHidden(index?: number, change?: ChangeInfo) {
+ if (index === undefined) return false;
+ if (change === undefined) return false;
+
+ const additionalCount = this._computeAdditionalReviewersCount(change);
+ const primaryCount = this._computePrimaryReviewers(change).length;
+ const isLast = index === primaryCount - 1;
+ return isLast && additionalCount === 0;
+ }
}
declare global {
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.ts
index 5316fe5..497ed1e 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.ts
@@ -113,9 +113,6 @@
.cell.label iron-icon {
vertical-align: top;
}
- .lastChildHidden:last-of-type {
- display: none;
- }
@media only screen and (max-width: 50em) {
:host {
display: flex;
@@ -197,6 +194,7 @@
is="dom-repeat"
items="[[_computePrimaryReviewers(change)]]"
as="reviewer"
+ indexAs="index"
>
<gr-account-link
hide-avatar=""
@@ -206,7 +204,11 @@
change="[[change]]"
account="[[reviewer]]"
></gr-account-link
- ><span class="lastChildHidden" aria-hidden="true">, </span>
+ ><span
+ hidden$="[[_computeCommaHidden(index, change)]]"
+ aria-hidden="true"
+ >,
+ </span>
</template>
<template is="dom-if" if="[[_computeAdditionalReviewersCount(change)]]">
<span title="[[_computeAdditionalReviewersTitle(change, config)]]">
diff --git a/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.ts b/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.ts
index d3452dc..322d32e 100644
--- a/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.ts
+++ b/polygerrit-ui/app/elements/plugins/gr-change-metadata-api/gr-change-metadata-api.ts
@@ -30,8 +30,7 @@
this._hook = this.plugin.hook('change-metadata-item');
}
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- onLabelsChanged(callback: (value: any) => void) {
+ onLabelsChanged(callback: (value: unknown) => void) {
if (!this._hook) {
this._createHook();
}
diff --git a/polygerrit-ui/app/scripts/util.ts b/polygerrit-ui/app/scripts/util.ts
index 59ade33..bf7120f 100644
--- a/polygerrit-ui/app/scripts/util.ts
+++ b/polygerrit-ui/app/scripts/util.ts
@@ -49,8 +49,7 @@
// True if the promise is either resolved or reject (possibly cancelled)
let isDone = false;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- let rejectPromise: (reason?: any) => void;
+ let rejectPromise: (reason?: unknown) => void;
const wrappedPromise: CancelablePromise<T> = new Promise(
(resolve, reject) => {