Skip to content

Enum ordinal can <0? #3339

@Bricks-Man

Description

@Bricks-Man
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • [] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: master
  • Operating System version: deepin 15.9
  • Java version: 8

I want to know more about dubbo.And I found this code in module dubbo-metrics/dubbo-metrics-api/.../MetrcLevel

static {
        for (MetricLevel level : MetricLevel.values()) {
            if (level.ordinal() < 0) {
                throw new RuntimeException("MetricLevel can not < 0");
            }
        }
    }

I think this code is futility.Is it possible of level.ordinal() < 0?

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