Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: pkg/analysis_server/lib/src/plugin/notification_manager.dart

Issue 2708353008: Make it safe to initialize the notificationManager in server (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/plugin/notification_manager.dart
diff --git a/pkg/analysis_server/lib/src/plugin/notification_manager.dart b/pkg/analysis_server/lib/src/plugin/notification_manager.dart
index 7f150245b368fbef1d20c7d994b196278c541d6b..53d0513091eedaac9de602b99826646ca4772743 100644
--- a/pkg/analysis_server/lib/src/plugin/notification_manager.dart
+++ b/pkg/analysis_server/lib/src/plugin/notification_manager.dart
@@ -48,8 +48,8 @@ class NotificationManager {
/**
* The current set of subscriptions to which the client has subscribed.
*/
- Map<server.AnalysisService, List<String>> currentSubscriptions =
- <server.AnalysisService, List<String>>{};
+ Map<server.AnalysisService, Set<String>> currentSubscriptions =
+ <server.AnalysisService, Set<String>>{};
/**
* The collector being used to collect the analysis errors from the plugins.
@@ -294,7 +294,7 @@ class NotificationManager {
* Set the current subscriptions to the given set of [newSubscriptions].
*/
void setSubscriptions(
- Map<server.AnalysisService, List<String>> newSubscriptions) {
+ Map<server.AnalysisService, Set<String>> newSubscriptions) {
/**
* Return the collector associated with the given service, or `null` if the
* service is not handled by this manager.
@@ -322,8 +322,8 @@ class NotificationManager {
services.forEach((server.AnalysisService service) {
ResultCollector collector = collectorFor(service);
if (collector != null) {
- List<String> currentPaths = currentSubscriptions[service];
- List<String> newPaths = newSubscriptions[service];
+ Set<String> currentPaths = currentSubscriptions[service];
+ Set<String> newPaths = newSubscriptions[service];
if (currentPaths == null) {
if (newPaths == null) {
// This should not happen.

Powered by Google App Engine
This is Rietveld 408576698