Skip to content

Commit

Permalink
Add constant MIN_PATH_ARRAY_LENGTH
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Smile committed Mar 16, 2019
1 parent affc976 commit 8eb47c3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public void dataChanged(String path, Object value, EventType eventType) {
// TODO We limit the notification of config changes to a specific path level, for example
// /dubbo/config/service/configurators, other config changes not in this level will not get notified,
// say /dubbo/config/dubbo.properties
if (path.split("/").length >= 5) {
final int MIN_PATH_ARRAY_LENGTH = 5;
if (path.split("/").length >= MIN_PATH_ARRAY_LENGTH) {
String key = pathToKey(path);
ConfigChangeType changeType;
switch (eventType) {
Expand Down

0 comments on commit 8eb47c3

Please sign in to comment.