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:
@@ -29,7 +29,10 @@ http_archive(
|
|||||||
name = "io_bazel_rules_closure",
|
name = "io_bazel_rules_closure",
|
||||||
sha256 = "b9c2bc6ba377aa497eb7c31681d34404febf9d4e3c9c7d98ce0d78238a0af20f",
|
sha256 = "b9c2bc6ba377aa497eb7c31681d34404febf9d4e3c9c7d98ce0d78238a0af20f",
|
||||||
strip_prefix = "rules_closure-0.31",
|
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
|
# File is specific to Polymer and copied from the Closure Github -- should be
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ import java.lang.management.ManagementFactory;
|
|||||||
import java.lang.management.OperatingSystemMXBean;
|
import java.lang.management.OperatingSystemMXBean;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@SuppressWarnings("restriction")
|
|
||||||
class OperatingSystemMXBeanFactory {
|
class OperatingSystemMXBeanFactory {
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
||||||
|
private OperatingSystemMXBeanFactory() {}
|
||||||
|
|
||||||
static OperatingSystemMXBeanInterface create() {
|
static OperatingSystemMXBeanInterface create() {
|
||||||
OperatingSystemMXBean sys = ManagementFactory.getOperatingSystemMXBean();
|
OperatingSystemMXBean sys = ManagementFactory.getOperatingSystemMXBean();
|
||||||
if (sys instanceof UnixOperatingSystemMXBean) {
|
if (sys instanceof UnixOperatingSystemMXBean) {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ package com.google.gerrit.metrics.proc;
|
|||||||
|
|
||||||
import com.sun.management.UnixOperatingSystemMXBean;
|
import com.sun.management.UnixOperatingSystemMXBean;
|
||||||
|
|
||||||
@SuppressWarnings("restriction")
|
|
||||||
class OperatingSystemMXBeanUnixNative implements OperatingSystemMXBeanInterface {
|
class OperatingSystemMXBeanUnixNative implements OperatingSystemMXBeanInterface {
|
||||||
private final UnixOperatingSystemMXBean sys;
|
private final UnixOperatingSystemMXBean sys;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user