Commit 26234224 by 张乐 Committed by GitHub

Merge pull request #341 from nobodyiam/fix-properties-file-notification

Fix properties file notification
parents 15e27550 f5c03f96
...@@ -221,7 +221,16 @@ public class RemoteConfigLongPollService implements Initializable { ...@@ -221,7 +221,16 @@ public class RemoteConfigLongPollService implements Initializable {
if (Strings.isNullOrEmpty(notification.getNamespaceName())) { if (Strings.isNullOrEmpty(notification.getNamespaceName())) {
continue; continue;
} }
m_notifications.put(notification.getNamespaceName(), notification.getNotificationId()); String namespaceName = notification.getNamespaceName();
if (m_notifications.containsKey(namespaceName)) {
m_notifications.put(namespaceName, notification.getNotificationId());
}
//since .properties are filtered out by default, so we need to check if there is notification with .properties suffix
String namespaceNameWithPropertiesSuffix =
String.format("%s.%s", namespaceName, ConfigFileFormat.Properties.getValue());
if (m_notifications.containsKey(namespaceNameWithPropertiesSuffix)) {
m_notifications.put(namespaceNameWithPropertiesSuffix, notification.getNotificationId());
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment