From 2814561e921ad492020ec629e911c5c9212bc866 Mon Sep 17 00:00:00 2001 From: jianglai Date: Mon, 25 Sep 2017 10:04:40 -0700 Subject: [PATCH] Remove @Inject annotation in StackDriverWriter StackDriverWriter is provided by java.google.registry.monitoring.whitebox.StackdriverModule. The @Inject annotation in its constructor is not used. It also uses outdated named binding like @Named(stackdriverGcpProject) which causes confusion because that name is not provided anywhere in the code. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=169922096 --- .../metrics/stackdriver/StackdriverWriter.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/java/google/registry/monitoring/metrics/stackdriver/StackdriverWriter.java b/java/google/registry/monitoring/metrics/stackdriver/StackdriverWriter.java index c3c6880ee..d63bfbb76 100644 --- a/java/google/registry/monitoring/metrics/stackdriver/StackdriverWriter.java +++ b/java/google/registry/monitoring/metrics/stackdriver/StackdriverWriter.java @@ -57,8 +57,6 @@ import java.util.List; import java.util.Queue; import java.util.logging.Logger; import javax.annotation.concurrent.NotThreadSafe; -import javax.inject.Inject; -import javax.inject.Named; import org.joda.time.DateTime; import org.joda.time.Interval; import org.joda.time.format.DateTimeFormatter; @@ -140,13 +138,12 @@ public class StackdriverWriter implements MetricWriter { *

The monitoringClient must have read and write permissions to the Cloud Monitoring API v3 on * the provided project. */ - @Inject public StackdriverWriter( Monitoring monitoringClient, - @Named("stackdriverGcpProject") String project, + String project, MonitoredResource monitoredResource, - @Named("stackdriverMaxQps") int maxQps, - @Named("stackdriverMaxPointsPerRequest") int maxPointsPerRequest) { + int maxQps, + int maxPointsPerRequest) { this.monitoringClient = checkNotNull(monitoringClient); this.projectResource = "projects/" + checkNotNull(project); this.monitoredResource = monitoredResource;