DescriptionWhen a Java 1.5 enhanced switch statement is used on an enum, a synthetic class is created as an anonymous inner class of the class where the switch statement appears. That synthetic class stores a statuc array of the values of the enum, which is named $SwitchMap$com$google$AnEnum.
What's more, the number of assignments into that array is pyramid(N), where N is the number of case clauses in the switch. Ie. for 14 case clauses, we got a global cost of 105.
We don't want to record the assignments into this JVM-internal array.
Patch Set 1 #
MessagesTotal messages: 2
|
|||||||||||||||||||||||||||||||||||||