Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  OperatingSystemMXBeanFactory: Add a default constructor
  Remove unnecessary @SuppressWarnings("restriction")
  Add mirror for downloading Bazel rules.
  Add test that verifies 'visibleto' predicate for group

Change-Id: I48f7a0d3121edc9dda7726c445aa044bb23290a2
This commit is contained in:
David Pursehouse
2020-04-24 17:33:04 +09:00
3 changed files with 6 additions and 3 deletions

View File

@@ -29,7 +29,10 @@ http_archive(
name = "io_bazel_rules_closure",
sha256 = "b9c2bc6ba377aa497eb7c31681d34404febf9d4e3c9c7d98ce0d78238a0af20f",
strip_prefix = "rules_closure-0.31",
urls = ["https://github.com/davido/rules_closure/archive/V0.31.tar.gz"],
urls = [
"https://github.com/davido/rules_closure/archive/V0.31.tar.gz",
"https://gerrit-ci.gerritforge.com/lib/V0.31.tar.gz",
],
)
# File is specific to Polymer and copied from the Closure Github -- should be

View File

@@ -20,10 +20,11 @@ import java.lang.management.ManagementFactory;
import java.lang.management.OperatingSystemMXBean;
import java.util.Arrays;
@SuppressWarnings("restriction")
class OperatingSystemMXBeanFactory {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private OperatingSystemMXBeanFactory() {}
static OperatingSystemMXBeanInterface create() {
OperatingSystemMXBean sys = ManagementFactory.getOperatingSystemMXBean();
if (sys instanceof UnixOperatingSystemMXBean) {

View File

@@ -16,7 +16,6 @@ package com.google.gerrit.metrics.proc;
import com.sun.management.UnixOperatingSystemMXBean;
@SuppressWarnings("restriction")
class OperatingSystemMXBeanUnixNative implements OperatingSystemMXBeanInterface {
private final UnixOperatingSystemMXBean sys;