为什么 final Byte 作为 switch 语句中的 case 不能编译?

Why final Byte as a case in switch statement doesn't compile?

byte a = 125;
final byte b = 2;
final Byte c = 3;
switch (a) {
case b: // works fine
    break;
case c: // Constant Expression required
    break;
}

因为 c 是一个 final 变量,它不是一个编译时间常数,因此不是一个有效的 case 标签吗?

Since c is a final variable, isn't it a compile time constant

没有。 JLS 15.28中给出了常量表达式的规则,它们不包括包装类型:

A constant expression is an expression denoting a value of primitive type or a String that does not complete abruptly and is composed using only the following [...]

包装器类型既不是原始类型也不是 String