diff --git a/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/telemetry/core/service/TelemetryServiceFactory.java b/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/telemetry/core/service/TelemetryServiceFactory.java index 4f925b501..184f83a2c 100644 --- a/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/telemetry/core/service/TelemetryServiceFactory.java +++ b/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/telemetry/core/service/TelemetryServiceFactory.java @@ -18,23 +18,23 @@ public class TelemetryServiceFactory { - private final Environment.Builder builder = new Environment.Builder() - .ide(new IDE.Factory().create().setJavaVersion()); + private final IDE ide = new IDE.Factory() + .create() + .setJavaVersion(); - public TelemetryService create(Plugin plugin) { - Environment environment = builder.plugin(plugin).build(); - TelemetryConfiguration configuration = TelemetryConfiguration.getInstance(); - IMessageBroker broker = createSegmentBroker(configuration.isDebug(), environment); - return new TelemetryService(configuration, broker); - } + public TelemetryService create(Plugin plugin) { + Environment environment = new Environment.Builder() + .ide(ide) + .plugin(plugin) + .build(); + TelemetryConfiguration configuration = TelemetryConfiguration.getInstance(); + IMessageBroker broker = createSegmentBroker(configuration.isDebug(), environment); + return new TelemetryService(configuration, broker); + } - private IMessageBroker createSegmentBroker(boolean isDebug, Environment environment) { - SegmentConfiguration brokerConfiguration = new SegmentConfiguration(); - return new SegmentBroker( - isDebug, - UserId.INSTANCE.get(), - environment, - brokerConfiguration); - } + private IMessageBroker createSegmentBroker(boolean isDebug, Environment environment) { + SegmentConfiguration brokerConfiguration = new SegmentConfiguration(); + return new SegmentBroker(isDebug, UserId.INSTANCE.get(), environment, brokerConfiguration); + } }