- [x] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate. - [] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) 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?
Activity
CrazyHZM commentedon Jan 25, 2019
level.ordinal()the initial value is 0Bricks-Man commentedon Jan 25, 2019
I know it's init with 0, but can it < 0?
CrazyHZM commentedon Jan 25, 2019
I agree with you, this code is futility.
cvictory commentedon Jan 25, 2019
Bricks-Man commentedon Jan 25, 2019
I have committed a pr.
kexianjun commentedon Jan 25, 2019
closed since this pr #3346 has been merged