Skip to content

Commit

Permalink
~ remove redundant UnstableApiUsage inspection suppression
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinherron committed Apr 25, 2022
1 parent f239cab commit 8b8544a
Showing 1 changed file with 1 addition and 5 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 the Eclipse Milo Authors
* Copyright (c) 2022 the Eclipse Milo Authors
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -100,7 +100,6 @@ protected void onStartup() {
diagnosticsEnabled.set(diagnosticsNode.getEnabledFlag());

if (diagnosticsEnabled.get()) {
//noinspection UnstableApiUsage
server.getEventBus().register(eventSubscriber = new EventSubscriber());
}

Expand All @@ -116,12 +115,10 @@ protected void onStartup() {
getSubscriptions().forEach(this::createSubscriptionDiagnosticsNode);

if (eventSubscriber == null) {
//noinspection UnstableApiUsage
server.getEventBus().register(eventSubscriber = new EventSubscriber());
}
} else if (previous && !current) {
if (eventSubscriber != null) {
//noinspection UnstableApiUsage
server.getEventBus().unregister(eventSubscriber);
eventSubscriber = null;
}
Expand Down Expand Up @@ -162,7 +159,6 @@ protected void onShutdown() {
}

if (eventSubscriber != null) {
//noinspection UnstableApiUsage
server.getEventBus().unregister(eventSubscriber);
eventSubscriber = null;
}
Expand Down

0 comments on commit 8b8544a

Please sign in to comment.