Skip to content

[Bugfix] Telnet unable get proper health when execute 'status' without parameter #6192

@AlbumenJ

Description

@AlbumenJ

Environment

  • Dubbo version: 2.7.6
  • Operating System version: Windows 10
  • Java version: jdk 8

The following code in StatusTelnetHandler will cause program always unable to enter if branch.
( statuses is absolutely empty after initialization. )

        Map<String, Status> statuses = new HashMap<String, Status>();
        if (CollectionUtils.isNotEmptyMap(statuses)) {
            String[] ss = COMMA_SPLIT_PATTERN.split(status);
            for (String s : ss) {
                StatusChecker handler = extensionLoader.getExtension(s);
                Status stat;
                try {
                    stat = handler.check();
                } catch (Throwable t) {
                    stat = new Status(Status.Level.ERROR, t.getMessage());
                }
                statuses.put(s, stat);
            }
        }
        Status stat = StatusUtils.getSummaryStatus(statuses);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions