public void removeSuperfluousDefaults() {
    throwIfImmutable();

    int sz = size;

    if (sz != (targets.size() - 1)) {
      throw new IllegalArgumentException("incomplete instance");
    }

    int defaultTarget = targets.get(sz);
    int at = 0;

    for (int i = 0; i < sz; i++) {
      int target = targets.get(i);
      if (target != defaultTarget) {
        if (i != at) {
          targets.set(at, target);
          values.set(at, values.get(i));
        }
        at++;
      }
    }

    if (at != sz) {
      values.shrink(at);
      targets.set(at, defaultTarget);
      targets.shrink(at + 1);
      size = at;
    }
  }
Shrinks this instance if possible, removing test elements that refer to the default target.
This is only valid after the instance is fully populated, including the default target
(naturally).
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/SwitchList.java