From 79e7672d5d99cfcd7b3e1792e71f69471430d3a6 Mon Sep 17 00:00:00 2001 From: Diego Alonso Marquez Palacios Date: Wed, 7 Jun 2023 16:20:27 -0400 Subject: [PATCH] chore: make `GoogleApiFactory` an OSGi compliant component (#3738) --- .../tools/eclipse/googleapis/internal/GoogleApiFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/com.google.cloud.tools.eclipse.googleapis/src/com/google/cloud/tools/eclipse/googleapis/internal/GoogleApiFactory.java b/plugins/com.google.cloud.tools.eclipse.googleapis/src/com/google/cloud/tools/eclipse/googleapis/internal/GoogleApiFactory.java index 2c9e50c401..d704b2a2b7 100644 --- a/plugins/com.google.cloud.tools.eclipse.googleapis/src/com/google/cloud/tools/eclipse/googleapis/internal/GoogleApiFactory.java +++ b/plugins/com.google.cloud.tools.eclipse.googleapis/src/com/google/cloud/tools/eclipse/googleapis/internal/GoogleApiFactory.java @@ -38,6 +38,7 @@ import org.eclipse.core.net.proxy.IProxyChangeEvent; import org.eclipse.core.net.proxy.IProxyChangeListener; import org.eclipse.core.net.proxy.IProxyService; +import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; @@ -45,6 +46,7 @@ /** * Class to obtain various Google Cloud Platform related APIs. */ +@Component public class GoogleApiFactory implements IGoogleApiFactory { private static AccountProvider accountProvider = DefaultAccountProvider.INSTANCE; @@ -67,7 +69,7 @@ public void proxyInfoChanged(IProxyChangeEvent event) { }; @VisibleForTesting - GoogleApiFactory() { + public GoogleApiFactory() { this(new ProxyFactory()); }