Specific String-in-Switch case labels cause ArrayIndexOutOfBoundsException

Issue #148 resolved
Jesper Öqvist created an issue

ExtendJ 8.0.1-77-g270d5ec

A particular set of case labels in a String-in-Switch statement causes an ArrayIndexOutOfBoundsException during code generation. This is a test case triggering the bug:

class Test {
  void f(String s) {
    switch (s) {
      case "#metadataBlock":
      case "#datasetField":
      case "#controlledVocabulary":

Comments (3)

  1. Jesper Öqvist reporter

    This is caused by the internal tableSwitchSize variable overflowing. Fix is to change it to a long.

  2. Log in to comment